I have two machines, laptop and oracle.
This is a session:
TERMINAL 1 (starts a.netcat on remote machine)
Laptop $ ssh -p 6789 zx@$ORCL_H -i ~/.ssh/identities/oracle/nixos/zx.priv.key
Oracle $ nc -l 7777
TERMINAL 2 (starts a remote port forwarding)
Laptop $ ssh -p 6789 -L 9999:$ORCL_H:7777 zx@$ORCL_H -i ~/.ssh/identities/oracle/nixos/zx.priv.key
TERMINAL 3 (tries to connect to.netcat server but via local port on laptop)
Laptop $ nc localhost 9999
--
ORCL_H is set correctly in both T1 and T2
However, when I try to type something in either.netcat sessions, I see nothing. What am I doing wrong?
I've turned GatewayPorts yes on the remote machine.
I should note that the exact sequence of command but with another host (not oracle) works as expected
Check if you do have AllowTcpForwarding yes
in your sshd config in the Oracle machine.
EDIT: It should not be able caused by packets silently dropped by firewall as incorrectly suggested in this post before. If you are able to connect there by SSH, the forwarded traffic should be indistinguishable.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.