خرید بک لینک

I have a script that executes same commands on multiple servers via ssh .

spawn ssh [lindex $argv 0]
send "sudo /usr/sbin/useradd ytkatchen"
expect "password:"
send "Unix@999r"

My password is not same/alike for all servers . I have 2 different passwords for a long list of servers .

My requirement is the script should make ssh coection and use correct valid password to keep the job going .

It should not execute if the password is wrong rather it should try other password and keep going.

برچسب: نویسنده: استخدام کار تاريخ: جمعه 28 اسفند 1394 ساعت: 19:42

صفحه بندی