mirror of
https://github.com/clearml/dropbear
synced 2025-05-23 04:34:00 +00:00
use option -q for suppression remote banner output, pass option also for proxy command
This commit is contained in:
parent
fa4a1ab435
commit
360d60fb34
@ -62,6 +62,7 @@ static void printhelp() {
|
|||||||
"-T Don't allocate a pty\n"
|
"-T Don't allocate a pty\n"
|
||||||
"-N Don't run a remote command\n"
|
"-N Don't run a remote command\n"
|
||||||
"-f Run in background after auth\n"
|
"-f Run in background after auth\n"
|
||||||
|
"-q quiet, don't show remote banner\n"
|
||||||
"-y Always accept remote host key if unknown\n"
|
"-y Always accept remote host key if unknown\n"
|
||||||
"-y -y Don't perform any remote host key checking (caution)\n"
|
"-y -y Don't perform any remote host key checking (caution)\n"
|
||||||
"-s Request a subsystem (use by external sftp)\n"
|
"-s Request a subsystem (use by external sftp)\n"
|
||||||
@ -141,6 +142,7 @@ void cli_getopts(int argc, char ** argv) {
|
|||||||
cli_opts.username = NULL;
|
cli_opts.username = NULL;
|
||||||
cli_opts.cmd = NULL;
|
cli_opts.cmd = NULL;
|
||||||
cli_opts.no_cmd = 0;
|
cli_opts.no_cmd = 0;
|
||||||
|
cli_opts.quiet = 0;
|
||||||
cli_opts.backgrounded = 0;
|
cli_opts.backgrounded = 0;
|
||||||
cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
|
cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
|
||||||
cli_opts.always_accept_key = 0;
|
cli_opts.always_accept_key = 0;
|
||||||
@ -214,6 +216,9 @@ void cli_getopts(int argc, char ** argv) {
|
|||||||
}
|
}
|
||||||
cli_opts.always_accept_key = 1;
|
cli_opts.always_accept_key = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'q': /* quiet */
|
||||||
|
cli_opts.quiet = 1;
|
||||||
|
break;
|
||||||
case 'p': /* remoteport */
|
case 'p': /* remoteport */
|
||||||
next = (char**)&cli_opts.remoteport;
|
next = (char**)&cli_opts.remoteport;
|
||||||
break;
|
break;
|
||||||
@ -540,6 +545,12 @@ multihop_passthrough_args() {
|
|||||||
ret = m_malloc(len);
|
ret = m_malloc(len);
|
||||||
total = 0;
|
total = 0;
|
||||||
|
|
||||||
|
if (cli_opts.quiet)
|
||||||
|
{
|
||||||
|
int written = snprintf(ret+total, len-total, "-q ");
|
||||||
|
total += written;
|
||||||
|
}
|
||||||
|
|
||||||
if (cli_opts.no_hostkey_check)
|
if (cli_opts.no_hostkey_check)
|
||||||
{
|
{
|
||||||
int written = snprintf(ret+total, len-total, "-y -y ");
|
int written = snprintf(ret+total, len-total, "-y -y ");
|
||||||
|
Loading…
Reference in New Issue
Block a user