diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-12 21:04:23 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-12 21:04:23 +0000 |
commit | cf71d89802ecf03b7d1dd8d61a4af630cfa5d7ce (patch) | |
tree | 980a983497b493d262b9ce174b6862a25e34e085 /usr.bin/ssh/ssh.c | |
parent | 8d90ee6eaa4d95c8a88d9cbfec824d75ac8d09c5 (diff) |
-P/UsePrivilegedPort from 1.2.27, it turns of allocation of priv. port
and disabled rhosts/rhosts-rsa, ok deraadt@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index bf9dc850276..9fce3199b8b 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -18,7 +18,7 @@ Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada. */ #include "includes.h" -RCSID("$Id: ssh.c,v 1.22 1999/10/03 21:50:04 provos Exp $"); +RCSID("$Id: ssh.c,v 1.23 1999/10/12 21:04:22 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -97,6 +97,7 @@ usage() fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n"); fprintf(stderr, " -v Verbose; display verbose debugging messages.\n"); fprintf(stderr, " -V Display version number only.\n"); + fprintf(stderr, " -P Don't allocate a privileged port.\n"); fprintf(stderr, " -q Quiet; don't display any warning messages.\n"); fprintf(stderr, " -f Fork into background after authentication.\n"); fprintf(stderr, " -e char Set escape character; ``none'' = disable (default: ~).\n"); @@ -274,6 +275,10 @@ main(int ac, char **av) options.gateway_ports = 1; break; + case 'P': + options.use_privileged_port = 0; + break; + case 'a': options.forward_agent = 0; break; @@ -522,7 +527,14 @@ main(int ac, char **av) restore_uid(); /* Open a connection to the remote host. This needs root privileges if - rhosts_authentication is true. */ + rhosts_{rsa_}authentication is true. */ + + if (!options.use_privileged_port) + { + options.rhosts_authentication = 0; + options.rhosts_rsa_authentication = 0; + } + ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, !options.rhosts_authentication && !options.rhosts_rsa_authentication, |