dcsimg
Linux Today: Linux News On Internet Time.





More on LinuxToday


Automating ssh logins (without keys) with 'expect'

Feb 04, 2010, 01:33 (0 Talkback[s])

WEBINAR:
On-Demand

How to Help Your Business Become an AI Early Adopter


[ Thanks to Dave for this link. ]

"You need to automate a task across many machines. You know the user name and password, but for some reason, either by policy or otherwise, you are not allowed to use PKI, or Public Key Infrastructure.

"Well, not to give up hope just yet, because there is a nice little tool that is extremely powerful, yet not widely utilized. it's called 'expect'.

"Expect does just as you would, uh expect it to do. It will start a process that would normally have interaction, and then you can tell it what to expect in return. Maybe you have to answer a yes or no question or supply it with a name or password. It's not just limited to that. You can specify conditions as to what kind of conversation expect would have. Let's use SSH as an example:"

Complete Story

Related Stories:


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.