/SSH

SSH端口转发示例

SSH本地端口转发

#ssh -L <local port>:<remote host>:<remote port> <SSH hostname>

#例如远程调试nodejs服务
ssh -L 9221:localhost:9229 user@remote.example.com

SSH远程端口转发

#ssh -R <local port>:<remote host>:<remote port> <SSH hostname>

#例如将远程端口映射到本地端口,方便在服务器上使用本地代理
ssh -R 1080:localhost:1080 user@remote.example.com