Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: regular expression matching in expect

by zengargoyle (Deacon)
on Aug 10, 2012 at 11:31 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-19 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found