Last active
March 12, 2016 20:04
-
-
Save TheCase/c441a3d138dfab70ec6c 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 | |
set cmd [lindex $argv 0] | |
eval spawn ssh admin@ap | |
set prompt ":|#|\\\$" | |
interact -o -nobuffer -re $prompt return | |
send "the-actual-passsword\r" | |
interact -o -nobuffer -re $prompt return | |
send "system led $cmd\r" | |
interact -o -nobuffer -re $prompt return | |
send "exit\r" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment