summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-28 07:57:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-28 07:57:43 +0000
commita394df976c1e7672f9ae801799c2ce496e0c32ce (patch)
tree7703eb7da11367feeb85126a41dae23c7882f027 /usr.bin/ssh/ssh.c
parent725ac8b6344073209be33cdbe6901588ae4e69a8 (diff)
user@host; aaron
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 039d92c08c0..cc938505d00 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.2 1999/09/28 04:45:37 provos Exp $");
+RCSID("$Id: ssh.c,v 1.3 1999/09/28 07:57:42 deraadt Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -243,7 +243,13 @@ main(int ac, char **av)
{
if (host)
break;
- host = av[optind];
+ if ((cp = strchr(av[optind], '@'))) {
+ options.user = av[optind];
+ *cp = '\0';
+ host = ++cp;
+ }
+ else
+ host = av[optind];
continue;
}
opt = av[optind][1];