直接上命令:
# http代理
ssh -o ProxyCommand="nc -X connect -x 127.0.0.1:3128 %h %p" root@<server_ip>
# socks代理
ssh -o ProxyCommand="nc -X 5 -x 127.0.0.1:1080 %h %p" root@<server_ip>
说明:
nc
命令的常用参数:
-X
是指定代理协议
-x
是指定代理服务器和端口[代理服务器:端口]
socks
使用1080HTTPS
使用3128“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:ssh通过http或者socks代理连接远程服务器