1

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?

1
  • @MartinPrikryl oh I corrected the question.
    – kiatra
    Commented Nov 3, 2019 at 22:42

1 Answer 1

0

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.

3
  • There's probably something that listens on the port 7000 on your Windows machine already. Commented Nov 4, 2019 at 7:08
  • @MartinPrikryl, you mean port 4022 as 7000 worked. But where is the forwarding done? Is it done on the windows machine? I thought it is done on the linux machine? Because there I can do 'ssh -p 7000:localhost'
    – kiatra
    Commented Nov 5, 2019 at 1:08
  • Yes - 4022. Yes - on the Linux machine :) Commented Nov 5, 2019 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .