# HG changeset patch # User HansH111 # Date 1647181202 0 # Node ID 33363a68784d9ef9f1ab17631e52618778115678 # Parent bfd0f3248df3ea0c99bc7534bad06ae27da04552 use option -q for suppression remote banner output, pass option also for proxy command diff -r bfd0f3248df3 -r 33363a68784d cli-runopts.c --- a/cli-runopts.c Sun Mar 13 14:16:50 2022 +0000 +++ b/cli-runopts.c Sun Mar 13 14:20:02 2022 +0000 @@ -62,6 +62,7 @@ "-T Don't allocate a pty\n" "-N Don't run a remote command\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 -y Don't perform any remote host key checking (caution)\n" "-s Request a subsystem (use by external sftp)\n" @@ -141,6 +142,7 @@ cli_opts.username = NULL; cli_opts.cmd = NULL; cli_opts.no_cmd = 0; + cli_opts.quiet = 0; cli_opts.backgrounded = 0; cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */ cli_opts.always_accept_key = 0; @@ -214,6 +216,9 @@ } cli_opts.always_accept_key = 1; break; + case 'q': /* quiet */ + cli_opts.quiet = 1; + break; case 'p': /* remoteport */ next = (char**)&cli_opts.remoteport; break; @@ -540,6 +545,12 @@ ret = m_malloc(len); total = 0; + if (cli_opts.quiet) + { + int written = snprintf(ret+total, len-total, "-q "); + total += written; + } + if (cli_opts.no_hostkey_check) { int written = snprintf(ret+total, len-total, "-y -y ");