|
Posted by BertieBigBollox@gmail.com on April 17, 2008, 4:51 am
If you were Registered and logged in, you could reply and use other advanced thread options > >Trying to ssh from a Sun Solaris box to a Cisco router and want to use
> >a script to log in automatically without it prompting for a username
> >and password.
> >Looks like you can use ssh -l <username> to specify a username but
> >there doesnt appear to be a way to send the password, so it still
> >prompts for this.
> >I understand that if I was ssh to another unix box I could probably
> >use the 'expects' command and do it this way but I guess its no good
> >for a cisco router.
>
> (expect, not expects)
> Why not? Same exact thing.
>
OK. I just thought that since I was running ssh, control wouldnt
return to the script running this (and thus go on to the next line
with the expect statement on until the ssh command was all done and
complete?
Dont you need to use 'spawn' or something if doing it this way? Is
this right?
|