转载自 https://www.cnblogs.com/liuxianshen/p/use-socks-proxy-connect-remote-server-in-ssh.html
- 直接敲命令
ssh -p 2022 -o ProxyCommand='ncat --proxy-type socks5 --proxy 127.0.0.1:7890 %h %p --proxy-auth test:123456' test2@192.168.0.233
- ~/.ssh/config中添加配置
Host loli
HostName 192.168.0.233
Port 2022
User test2
IdentityFile ~/.ssh/id_rsa
ProxyCommand ncat --proxy-type socks5 --proxy 127.0.0.1:7890 %h %p --proxy-auth test:123456