- $ ssh -D local-port tunnel-host -N
-
参数说明
举例
- # 开启本地端口2121 动态转发
- $ ssh -D 2121 root@127.0.0.1 -N
-
- # curl 的-x参数指定代理服务器
- # 通过 SOCKS5 协议的本地2121端口,访问 https://httpbin.org/get
- $ curl -x socks5://localhost:2121 https://httpbin.org/get
-
- $ ssh -L -N local-port:target-host:target-port tunnel-host
-
参数说明
- $ ssh -R remote-port:target-host:target-port -N remotehost
-
参数说明