Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2018-05-25 20:46 GMT
Find Nodes?
    Voting Booth?