Friday, December 19, 2008

Login into to ssh server automatically with expect

#!/bin/expect -f
# Connect to the server, please change the username and remote server address
#   http://scriptdemo.blogspot.com

spawn ssh USERNAME@serveraddress
#send the password to the server, please change it for "send" line
expect "password:"
send "password\n"
interact

No comments:

ShowCalendar