From a394df976c1e7672f9ae801799c2ce496e0c32ce Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 28 Sep 1999 07:57:43 +0000 Subject: user@host; aaron --- usr.bin/ssh/ssh.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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 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]; -- cgit v1.2.3