diff cli-runopts.c @ 497:ae600f1eef81

- Enable -s for specifying a subsystem (such as sftp)
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 Sep 2008 15:57:26 +0000
parents 66eac4631d88
children d588e3ea557a 805e557fdff7
line wrap: on
line diff
--- a/cli-runopts.c	Tue Sep 23 12:03:01 2008 +0000
+++ b/cli-runopts.c	Tue Sep 23 15:57:26 2008 +0000
@@ -58,6 +58,7 @@
 					"-N    Don't run a remote command\n"
 					"-f    Run in background after auth\n"
 					"-y    Always accept remote host key if unknown\n"
+					"-s    Request a subsystem (use for sftp)\n"
 #ifdef ENABLE_CLI_PUBKEY_AUTH
 					"-i <identityfile>   (multiple allowed)\n"
 #endif
@@ -116,6 +117,7 @@
 	cli_opts.backgrounded = 0;
 	cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
 	cli_opts.always_accept_key = 0;
+	cli_opts.is_subsystem = 0;
 #ifdef ENABLE_CLI_PUBKEY_AUTH
 	cli_opts.privkeys = NULL;
 #endif
@@ -213,6 +215,9 @@
 				case 'f':
 					cli_opts.backgrounded = 1;
 					break;
+				case 's':
+					cli_opts.is_subsystem = 1;
+					break;
 #ifdef ENABLE_CLI_LOCALTCPFWD
 				case 'L':
 					nextislocal = 1;