summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-05-01 11:41:25 +0000
committerColin Watson <cjwatson@debian.org>2004-05-01 11:41:25 +0000
commit915bfea2af69a3bb352a9b4e98e3434b8425124d (patch)
treeef732498a75f2e13a7a9827edc833dc58bc2a2af /ssh.c
parent89e7a2dfe6044f3980098911a7470d401ff70eb1 (diff)
parent16f1d21ea191deaaeeba719d01c0ad82aa044653 (diff)
Merge 3.8.1p1 to the trunk, minus RFC.nroff (#211640).
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c61
1 files changed, 10 insertions, 51 deletions
diff --git a/ssh.c b/ssh.c
index 05960af98..376b38b0a 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.206 2003/12/16 15:49:51 markus Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.209 2004/03/11 10:21:17 markus Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -146,49 +146,12 @@ pid_t proxy_command_pid = 0;
146static void 146static void
147usage(void) 147usage(void)
148{ 148{
149 fprintf(stderr, "Usage: %s [options] host [command]\n", __progname); 149 fprintf(stderr,
150 fprintf(stderr, "Options:\n"); 150"usage: ssh [-1246AaCfghkNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]\n"
151 fprintf(stderr, " -l user Log in using this user name.\n"); 151" [-D port] [-e escape_char] [-F configfile] [-i identity_file]\n"
152 fprintf(stderr, " -n Redirect input from " _PATH_DEVNULL ".\n"); 152" [-L port:host:hostport] [-l login_name] [-m mac_spec] [-o option]\n"
153 fprintf(stderr, " -F config Config file (default: ~/%s).\n", 153" [-p port] [-R port:host:hostport] [user@]hostname [command]\n"
154 _PATH_SSH_USER_CONFFILE); 154 );
155 fprintf(stderr, " -A Enable authentication agent forwarding.\n");
156 fprintf(stderr, " -a Disable authentication agent forwarding (default).\n");
157 fprintf(stderr, " -X Enable X11 connection forwarding.\n");
158 fprintf(stderr, " -Y Enable trusted X11 connection forwarding.\n");
159 fprintf(stderr, " -x Disable X11 connection forwarding (default).\n");
160 fprintf(stderr, " -i file Identity for public key authentication "
161 "(default: ~/.ssh/identity)\n");
162#ifdef SMARTCARD
163 fprintf(stderr, " -I reader Set smartcard reader.\n");
164#endif
165 fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n");
166 fprintf(stderr, " -T Do not allocate a tty.\n");
167 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n");
168 fprintf(stderr, " Multiple -v increases verbosity.\n");
169 fprintf(stderr, " -V Display version number only.\n");
170 fprintf(stderr, " -q Quiet; don't display any warning messages.\n");
171 fprintf(stderr, " -f Fork into background after authentication.\n");
172 fprintf(stderr, " -e char Set escape character; ``none'' = disable (default: ~).\n");
173
174 fprintf(stderr, " -c cipher Select encryption algorithm\n");
175 fprintf(stderr, " -m macs Specify MAC algorithms for protocol version 2.\n");
176 fprintf(stderr, " -p port Connect to this port. Server must be on the same port.\n");
177 fprintf(stderr, " -L listen-port:host:port Forward local port to remote address\n");
178 fprintf(stderr, " -R listen-port:host:port Forward remote port to local address\n");
179 fprintf(stderr, " These cause %s to listen for connections on a port, and\n", __progname);
180 fprintf(stderr, " forward them to the other side by connecting to host:port.\n");
181 fprintf(stderr, " -D port Enable dynamic application-level port forwarding.\n");
182 fprintf(stderr, " -C Enable compression.\n");
183 fprintf(stderr, " -N Do not execute a shell or command.\n");
184 fprintf(stderr, " -g Allow remote hosts to connect to forwarded ports.\n");
185 fprintf(stderr, " -1 Force protocol version 1.\n");
186 fprintf(stderr, " -2 Force protocol version 2.\n");
187 fprintf(stderr, " -4 Use IPv4 only.\n");
188 fprintf(stderr, " -6 Use IPv6 only.\n");
189 fprintf(stderr, " -o 'option' Process the option as if it was read from a configuration file.\n");
190 fprintf(stderr, " -s Invoke command (mandatory) as SSH2 subsystem.\n");
191 fprintf(stderr, " -b addr Local IP address.\n");
192 exit(1); 155 exit(1);
193} 156}
194 157
@@ -347,12 +310,8 @@ again:
347 } 310 }
348 /* fallthrough */ 311 /* fallthrough */
349 case 'V': 312 case 'V':
350 fprintf(stderr, 313 fprintf(stderr, "%s, %s\n",
351 "%s, SSH protocols %d.%d/%d.%d, %s\n", 314 SSH_VERSION, SSLeay_version(SSLEAY_VERSION));
352 SSH_VERSION,
353 PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1,
354 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
355 SSLeay_version(SSLEAY_VERSION));
356 if (opt == 'V') 315 if (opt == 'V')
357 exit(0); 316 exit(0);
358 break; 317 break;
@@ -782,7 +741,7 @@ x11_get_proto(char **_proto, char **_data)
782 xauthdir); 741 xauthdir);
783 snprintf(cmd, sizeof(cmd), 742 snprintf(cmd, sizeof(cmd),
784 "%s -f %s generate %s " SSH_X11_PROTO 743 "%s -f %s generate %s " SSH_X11_PROTO
785 " untrusted timeout 120 2>" _PATH_DEVNULL, 744 " untrusted timeout 1200 2>" _PATH_DEVNULL,
786 options.xauth_location, xauthfile, display); 745 options.xauth_location, xauthfile, display);
787 debug2("x11_get_proto: %s", cmd); 746 debug2("x11_get_proto: %s", cmd);
788 if (system(cmd) == 0) 747 if (system(cmd) == 0)