Created
March 9, 2010 07:33
-
-
Save lxneng/326350 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #使用expect | |
| #!/usr/bin/expect -f | |
| #auto ssh login | |
| set timeout 30 | |
| #set sshhost [lindex $argv 0] | |
| spawn ssh -D 9527 user@server.com | |
| expect "password:" | |
| send "password\r" | |
| interact | |
| #使用公钥/密钥 | |
| ssh-keygen -t dsa | |
| ssh-copy-id -i .ssh/id_dsa.pub user@server.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment