Last active
December 29, 2017 02:24
-
-
Save beanyoung/8f690fd3f6b51432386539c1c2556124 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 host [lindex $argv 0] | |
spawn ssh demo.com | |
send "su ubuntu\r" | |
expect "?assword" | |
send "password\r" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment