ssh代理
文章目录
前提条件
- 有一个ssh账号,现阶段互联网上还是有不少的的公司提供免费vps,云平台的,一般都提供ssh访问账号。
- 该服务器在墙外,墙内的虽然也能用,但没意义啊
开启步骤
-
安装expect,自动化ssh登录
1
sudo apt-get install expect
-
运行下述脚本
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/expect set timeout 10 spawn /usr/bin/ssh -D 6300 -g -p 42043 cabox@host12.codeanyhost.com expect { "password:" { send "密码r" } } interact { timeout 10 { send "n"} }
-
火狐浏览器,设置socket5类型代理,127.0.0.1,端口6300
-
连接google
文章作者 carter2005
上次更新 2017-09-01