本机做代理机命令如下:
ssh -qTfnN -D 9999 [email protected]
passwd: xxxx 输入密码
说明:
55.188.123.144 为远端可访问google的机器
lee为55.188.123.144登陆用户
9999为代理端口
–q Quiet mode. 安静模式,忽略一切对话和错误提示。
–T Disable pseudo–tty allocation. 不占用 shell 了。
–f Requests ssh to go to background just before command execution. 后台运行,并推荐加上 –n 参数。
–n Redirects stdin from /dev/null (actually, prevents reading from stdin). –f 推荐的,不加这条参数应该也行。
–N Do not execute a remote command. 不执行远程命令,专为端口转发度身打造
代理设置如下:
如firefox ->首选项 -> 网络设置 -> socks主机 : 127.0.0.1 端口:9999