SSH 客户端与服务器的端口转发配置指南
1. SSH 客户端本地端口转发
SSH 客户端的本地端口转发允许将本地端口的流量转发到远程服务器的特定端口。以下将介绍不同 SSH 客户端的配置方法。
1.1 命令行客户端配置
OpenSSH、SSH Communications 和 VanDyke Software 都提供了用于 SSH 连接的命令行客户端。
- OpenSSH 的命令行客户端是 ssh 。
- SSH Communications 的 SSH 客户端是 ssh2 。
- VanDyke Software 的 SSH 客户端是 vsh 。
使用 -L 或 -local 开关来配置本地(出站)端口转发选项,具体语法如下:
- OpenSSH 和 SSH Communications: -L listen - port:host:port
- VanDyke Software: -local localport:remotehost:remoteport
其中, listen - port 或 localport 是本地操作系统监听的端口, host 或 remotehost 是 SSH 服务器连接的远程服务器的 IP 地址, port </
超级会员免费看
订阅专栏 解锁全文
5

被折叠的 条评论
为什么被折叠?



