comparison 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
comparison
equal deleted inserted replaced
495:cd02449b709c 497:ae600f1eef81
56 "-t Allocate a pty\n" 56 "-t Allocate a pty\n"
57 "-T Don't allocate a pty\n" 57 "-T Don't allocate a pty\n"
58 "-N Don't run a remote command\n" 58 "-N Don't run a remote command\n"
59 "-f Run in background after auth\n" 59 "-f Run in background after auth\n"
60 "-y Always accept remote host key if unknown\n" 60 "-y Always accept remote host key if unknown\n"
61 "-s Request a subsystem (use for sftp)\n"
61 #ifdef ENABLE_CLI_PUBKEY_AUTH 62 #ifdef ENABLE_CLI_PUBKEY_AUTH
62 "-i <identityfile> (multiple allowed)\n" 63 "-i <identityfile> (multiple allowed)\n"
63 #endif 64 #endif
64 #ifdef ENABLE_CLI_LOCALTCPFWD 65 #ifdef ENABLE_CLI_LOCALTCPFWD
65 "-L <listenport:remotehost:remoteport> Local port forwarding\n" 66 "-L <listenport:remotehost:remoteport> Local port forwarding\n"
114 cli_opts.cmd = NULL; 115 cli_opts.cmd = NULL;
115 cli_opts.no_cmd = 0; 116 cli_opts.no_cmd = 0;
116 cli_opts.backgrounded = 0; 117 cli_opts.backgrounded = 0;
117 cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */ 118 cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
118 cli_opts.always_accept_key = 0; 119 cli_opts.always_accept_key = 0;
120 cli_opts.is_subsystem = 0;
119 #ifdef ENABLE_CLI_PUBKEY_AUTH 121 #ifdef ENABLE_CLI_PUBKEY_AUTH
120 cli_opts.privkeys = NULL; 122 cli_opts.privkeys = NULL;
121 #endif 123 #endif
122 #ifdef ENABLE_CLI_LOCALTCPFWD 124 #ifdef ENABLE_CLI_LOCALTCPFWD
123 cli_opts.localfwds = NULL; 125 cli_opts.localfwds = NULL;
210 case 'N': 212 case 'N':
211 cli_opts.no_cmd = 1; 213 cli_opts.no_cmd = 1;
212 break; 214 break;
213 case 'f': 215 case 'f':
214 cli_opts.backgrounded = 1; 216 cli_opts.backgrounded = 1;
217 break;
218 case 's':
219 cli_opts.is_subsystem = 1;
215 break; 220 break;
216 #ifdef ENABLE_CLI_LOCALTCPFWD 221 #ifdef ENABLE_CLI_LOCALTCPFWD
217 case 'L': 222 case 'L':
218 nextislocal = 1; 223 nextislocal = 1;
219 break; 224 break;