SSH auto connection without key authentication



There's is another way to connect to an ssh account without typing a password and without key authentication, by using expect.

1. Install expect package :

$ sudo apt-get install expect

2. Create this script :

#!/usr/bin/expect
spawn ssh user@yourhostip
expect "password:"
send "PASWORD\n";
interact

3. Run the new script.



Any thoughts?

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

Loading more content...