I am trying to connect to a windows host (destination) behind a firewall via a reverse ssh tunnel.
On the remote server I have edited /etc/ssh/ssh_config
to enable
AllowTcpForwarding yes
TCPKeepAlive yes
GatewayPorts clientspecified
then etc/init.d/ssh restart
On the destination I start have installed the build-in openssh server.
Then I start the reverse tunnel:
plink.exe linuxuser@remoteserer -R 4022:10.221.152.193:22 -N
But I can not connect from the remote server to the windows machine via the reverse tunnel:
ssh -p 4022 windowsuser@localhost
For testing the ssh server I have tried connect to the windows machine from a machine on the same network via:
ssh [email protected]
this works fine.
How can I further debug this?
Edit: I hade the idea to test a reverse tunnel to the remote linux server from my MacBook (macOS), that works fine. So the issue seems to be the Windows machine.
Edit2:
It does work with port 7000. From another client the reverse connection it also does work with the port 4022. But not from the windows machine. Strange is the redirect not done on the linux client?