=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/ssh/ssh.c 1999/09/28 04:45:37 1.2 +++ src/usr.bin/ssh/ssh.c 1999/09/28 07:57:42 1.3 @@ -18,7 +18,7 @@ */ #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 @@ { 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];