I am trying to open an ssh tunnel from a machine (let me call it arby) behind a natting router to another
machine, so I can sign in to that hidden computer from the outside
machine, let me call it info. Info is the name of the outside machine.
I can log on to info from arby using passwordless logon without trouble.
I run
ssh -vvv -nN -R 9000:localhost:info info
where info is the outside machine.
Unfortunately it does not work
Here is the end of the log produced by -vvv, after logs state tht there
was a successful logon onto info
-------------------------------------------------------------
debug1: Authentication succeeded (publickey).
Authenticated to info ([142.103.xxx.xxx]:22).
debug1: Remote connections from LOCALHOST:8024 forwarded to local address localhost:22
debug3: send packet: type 80
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x48
debug1: Requesting
no-more-...@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: exec
debug3: receive packet: type 80
debug1: client_input_global_request: rtype
hostk...@openssh.com want_reply 0
debug3: receive packet: type 4
debug1: Remote: Forwarding listen address "localhost" overridden by server GatewayPorts
debug3: receive packet: type 82
debug1: remote forward failure for: listen 8024, connect localhost:22
Warning: remote port forwarding failed for listen port 8024
debug1: All remote forwarding requests processed
debug3: send packet: type 1
-----------------------------------------------------
And this is the end of an attempt by another machine barby which
connected to info from behind another natting router.
-----------------------------------------------------
debug1: Authentication succeeded (publickey).
Authenticated to info ([142.103.234.23]:22).
debug1: Remote connections from LOCALHOST:8024 forwarded to local address localhost:22
debug3: send packet: type 80
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x48
debug1: Requesting
no-more-...@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: exec
debug3: receive packet: type 80
debug1: client_input_global_request: rtype
hostk...@openssh.com want_reply 0
debug3: receive packet: type 4
debug1: Remote: Forwarding listen address "localhost" overridden by server GatewayPorts
debug3: receive packet: type 81
debug1: remote forward success for: listen 8024, connect localhost:22
debug1: All remote forwarding requests processed
debug3: receive packet: type 90
The only difference seems to be that in second case it succeeded and the
first it failed. What could be the problem, and how can I track it down?
The second shows that the machine info does allow port forwarding. Why
could it be failing in the first case?