Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^3: regular expression matching in expect

by zengargoyle (Deacon)
on Aug 10, 2012 at 11:31 UTC ( #986723=note: print w/replies, xml ) Need Help??

in reply to Re^2: regular expression matching in expect
in thread regular expression matching in expect

If you're not too picky about remote host authentication...
ssh -o 'StrictHostKeyChecking no' -o 'CheckHostIP no' $host
See man ssh_config for more details. It can also be handy to use options to set the known_hosts file to /dev/null. Otherwise if you're picky it's probably best to manually ssh to all of your destination hosts once and accept the key manually and then failing if you get anything but login / password. It may be even handier to use the -l option to ssh to specify the login name so you don't have to try and match for the login case. Then you get down to the way my simple scripts of this type work: ssh as a specific user, ignore host key stuff, just wait for password and then the prompt... anything else is a die.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986723]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2016-10-24 06:06 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (303 votes). Check out past polls.