Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1828748
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/expect
# Login to SSH with password automatically
 
# Requires expect:
# sudo apt-get install expect
 
 
set timeout 60
spawn ssh gnufs@nsa.gov
while {1} {
expect {
eof {break}
"The authenticity of host" {send "yes\r"}
"password:" {send "p4ssw0rd\r"}
"*\]" {send "exit\r"}
}
}
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.