问题原文
原帖链接 · Chris Stryczynski · CC BY-SA 3.0
Using the command ssh -v -R 2255:localhost:2255 [email omitted] I was trying to figure out why remote port forwarding wasn't working until I realized GatewayPorts yes was not present in my host's sshd_config. Once I added that, it worked successfully.
Is there a way I could have diagnosed this?
The SSH even output the following (without GatewayPorts yes):
debug1: Remote connections from LOCALHOST:2255 forwarded to local address localhost:2255
debug1: channel 0: new [client-session]
debug1: Requesting [email omitted]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email omitted] want_reply 0
debug1: remote forward success for: listen 2255, connect localhost:2255
debug1: All remote forwarding requests processed
社区高分解答
原帖链接 · Jakuje · CC BY-SA 3.0
When you specify 2255:localhost:2255 fills the missing hostname in front as a localhost. This will really bind only to localhost address (loopback). If you want to use it also "from outside", you need to use the server IP for the remote port forwarding, such as example.com:2255:localhost:2255.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
