1827775 Members
2552 Online
109969 Solutions
New Discussion

Script Issue

 
UniRock
Regular Advisor

Script Issue

Hello All,

I have few servers and their IP addresses.
Ideally password for all servers should be same for a particular user but few servers might have an unknown passwd for that user.

I want to create a script that will log in to each server one by one (which ever is possible) using same username and passwd and take details like hostname etc.

Is that possible?

I searched and looks like expect may do it some part of it.

Any suggestions are most welcome.

Thanks..
1 REPLY 1
Steven Schweda
Honored Contributor

Re: Script Issue

Any reason not to use SSH? Once you get SSH
public-key authorization set up, you can stop
worrying about storing passwords in "expect"
scripts. (And if you're not worrying about
that now, then perhaps you should start.)
With SSH public-key authorization, no one
even cares what a user's password is.

Dozens of old threads describe how to
configure SSH keys.