Skip to content

Instantly share code, notes, and snippets.

@ninehills
Created November 2, 2011 09:32
Show Gist options
  • Save ninehills/1333256 to your computer and use it in GitHub Desktop.
Save ninehills/1333256 to your computer and use it in GitHub Desktop.
#!/usr/bin/expect
# require expect openssh
# modify PORT USER HOST PASS
set timeout 60
spawn /usr/bin/ssh -D PORT -g USER@HOST
expect {
"password:" {
send "PASS\r"
}
}
interact {
timeout 60 { send " "}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment