ubuntu底下SSH+Polipo越过围墙
- April 20th, 2010
- Write comment
最终方案
#!/usr/bin/expect -f
set timeout 300
spawn ssh -qTfnN -D 7070 xxxxx@my.cutessh.info
expect {
"*yes/no*" { send "yes\r" }
"*password*" { send "xxxxx\r" }
}
interact
sleep 60 && /usr/bin/expect -f /home/tsung/ssh.exp
socksParentProxy = "localhost:7070" socksProxyType = socks5 proxyAddress = "127.0.0.1" proxyPort = 1984
弯路
crontab -e */5 * * * * /usr/bin/expect -f /home/tsung/ssh.exp >> /home/tsung/errtask 2>&1