小编Jam*_*s T的帖子

SSH 手册页是否错误?

ssh手册页说明了以下内容:

 -L [bind_address:]port:host:hostport
         Specifies that the given port on the local (client) host is to be
         forwarded to the given host and port on the remote side. 

 -R [bind_address:]port:host:hostport
         Specifies that the given port on the remote (server) host is to
         be forwarded to the given host and port on the local side.
Run Code Online (Sandbox Code Playgroud)

这两个描述不是混淆了吗?

当我使用ssh -L它时,它需要一个远程端口并将它“绑定”(或转发)到我本地机器上的一个端口,这样我就可以通过与自己对话(localhost:port)来与某些远程机器对话。

当我使用ssh -R它时,它从本地网络上的计算机上获取一个端口,并将其“绑定”(或转发)到远程计算机(ssh 服务器)上的端口。然后,当我在服务器上时,我可以与我刚刚使用(localhost:port)连接的计算机在同一网络上的计算机的端口进行通信。

这也解释了 L 用于本地,R 用于远程(无论端口绑定到何处)。

(我不知道我是否正确使用了“绑定”这个词。这不是我想用引号暗示的意思)

ssh ssh-tunneling

1
推荐指数
1
解决办法
170
查看次数

标签 统计

ssh ×1

ssh-tunneling ×1