Created
November 19, 2012 08:11
-
-
Save xi4oh4o/4109531 to your computer and use it in GitHub Desktop.
ssh auto login script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set port you_port | |
set user you_user | |
set host you_ip | |
set password you_pass | |
set timeout -1 | |
spawn ssh -nNTf -D $port $user@$host | |
expect "*assword:*" | |
send "$password\r" | |
expect eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment