login ssh automatically

expect scripts for automated login with ssh connection.

set timeout 60
set PASS xxxxx
spawn /usr/bin/ssh root@ns2
expect “Password: “; send “$PASS\r”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.