Skip to content

Instantly share code, notes, and snippets.

@xream
Created April 10, 2012 08:35
Show Gist options
  • Save xream/2349384 to your computer and use it in GitHub Desktop.
Save xream/2349384 to your computer and use it in GitHub Desktop.
ssh.tcl
#!/usr/bin/expect
set timeout 60
while {1} {
spawn /usr/bin/ssh -NCD :7070 111111@111.com
expect {
"password:" { send "111111\r" }
}
interact {
timeout 60 { send " " }
eof { exp_continue }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment