Created
July 27, 2009 06:05
-
-
Save fuckgfw/156055 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 timeout 60 | |
spawn /usr/bin/ssh -D 7070 -g username@yourserver.com | |
#这里的 username 为你自己的用户名,yourserver.com 为你自己的服务器域名或ip | |
expect { | |
"password:" { | |
send "password\r" | |
#将第二个 password 改为你自己的密码 | |
} | |
} | |
interact { | |
timeout 60 { send " "} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
到验证密码的时候显示“Permission denied, please try again.”
我密码里面有个"",会不会有影响?