comparison cli-runopts.c @ 297:79bf1023cf11 agent-client

propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712) to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b)
author Matt Johnston <matt@ucc.asn.au>
date Tue, 21 Mar 2006 16:20:59 +0000
parents ca7e76d981d9 306499676384
children c1e9c81d1d27
comparison
equal deleted inserted replaced
225:ca7e76d981d9 297:79bf1023cf11
45 45
46 fprintf(stderr, "Dropbear client v%s\n" 46 fprintf(stderr, "Dropbear client v%s\n"
47 "Usage: %s [options] [user@]host\n" 47 "Usage: %s [options] [user@]host\n"
48 "Options are:\n" 48 "Options are:\n"
49 "-p <remoteport>\n" 49 "-p <remoteport>\n"
50 "-l <username>\n"
50 "-t Allocate a pty\n" 51 "-t Allocate a pty\n"
51 "-T Don't allocate a pty\n" 52 "-T Don't allocate a pty\n"
52 #ifdef ENABLE_CLI_PUBKEY_AUTH 53 #ifdef ENABLE_CLI_PUBKEY_AUTH
53 "-i <identityfile> (multiple allowed)\n" 54 "-i <identityfile> (multiple allowed)\n"
54 #endif 55 #endif
55 #ifdef ENABLE_CLI_AGENTFWD 56 #ifdef ENABLE_CLI_AGENTFWD
56 "-A Enable agent auth forwarding\n" 57 "-A Enable agent auth forwarding\n"
57 #endif 58 #endif
58 #ifdef ENABLE_CLI_LOCALTCPFWD 59 #ifdef ENABLE_CLI_LOCALTCPFWD
59 "-L <listenport:remotehost:remoteport> Local port forwarding\n" 60 "-L <listenport:remotehost:remoteport> Local port forwarding\n"
61 "-g Allow remote hosts to connect to forwarded ports\n"
60 #endif 62 #endif
61 #ifdef ENABLE_CLI_REMOTETCPFWD 63 #ifdef ENABLE_CLI_REMOTETCPFWD
62 "-R <listenport:remotehost:remoteport> Remote port forwarding\n" 64 "-R <listenport:remotehost:remoteport> Remote port forwarding\n"
63 #endif 65 #endif
64 "-l <username>\n"
65 #ifdef DEBUG_TRACE 66 #ifdef DEBUG_TRACE
66 "-v verbose\n" 67 "-v verbose\n"
67 #endif 68 #endif
68 ,DROPBEAR_VERSION, cli_opts.progname); 69 ,DROPBEAR_VERSION, cli_opts.progname);
69 } 70 }
94 #ifdef ENABLE_CLI_PUBKEY_AUTH 95 #ifdef ENABLE_CLI_PUBKEY_AUTH
95 cli_opts.privkeys = NULL; 96 cli_opts.privkeys = NULL;
96 #endif 97 #endif
97 #ifdef ENABLE_CLI_LOCALTCPFWD 98 #ifdef ENABLE_CLI_LOCALTCPFWD
98 cli_opts.localfwds = NULL; 99 cli_opts.localfwds = NULL;
100 opts.listen_fwd_all = 0;
99 #endif 101 #endif
100 #ifdef ENABLE_CLI_REMOTETCPFWD 102 #ifdef ENABLE_CLI_REMOTETCPFWD
101 cli_opts.remotefwds = NULL; 103 cli_opts.remotefwds = NULL;
102 #endif 104 #endif
103 #ifdef ENABLE_CLI_AGENTFWD 105 #ifdef ENABLE_CLI_AGENTFWD
104 cli_opts.agent_fwd = 0; 106 cli_opts.agent_fwd = 0;
105 cli_opts.agent_keys_loaded = 0; 107 cli_opts.agent_keys_loaded = 0;
106 #endif 108 #endif
107 opts.nolocaltcp = 0;
108 opts.noremotetcp = 0;
109 /* not yet 109 /* not yet
110 opts.ipv4 = 1; 110 opts.ipv4 = 1;
111 opts.ipv6 = 1; 111 opts.ipv6 = 1;
112 */ 112 */
113 113
171 cli_opts.wantpty = 0; 171 cli_opts.wantpty = 0;
172 break; 172 break;
173 #ifdef ENABLE_CLI_LOCALTCPFWD 173 #ifdef ENABLE_CLI_LOCALTCPFWD
174 case 'L': 174 case 'L':
175 nextislocal = 1; 175 nextislocal = 1;
176 break;
177 case 'g':
178 opts.listen_fwd_all = 1;
176 break; 179 break;
177 #endif 180 #endif
178 #ifdef ENABLE_CLI_REMOTETCPFWD 181 #ifdef ENABLE_CLI_REMOTETCPFWD
179 case 'R': 182 case 'R':
180 nextisremote = 1; 183 nextisremote = 1;