Create a gist now

Instantly share code, notes, and snippets.

# Login to SSH with password automatically
# Requires expect:
# sudo apt-get install expect
set timeout 60
spawn ssh
while {1} {
expect {
eof {break}
"The authenticity of host" {send "yes\r"}
"password:" {send "p4ssw0rd\r"}
"*\]" {send "exit\r"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment