-
-
Save d4rk8l1tz/debbb65a552a7baa546e to your computer and use it in GitHub Desktop.
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 username [lrange $argv 0 0] | |
set host [lrange $argv 1 1] | |
set password [lrange $argv 2 2] | |
set timeout -1 | |
spawn ssh $username@$host | |
expect "*?assword:*" | |
send -- "$password\r" | |
send -- "\r" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment