RDP to Windows machine via SSH tunnels breaks the connection

1

2

I am having a weird problem that I cannot understand why it happens.

Basically, it is the same symptoms described by this user: http://www.dslreports.com/forum/r29166088-RDP-via-SSH-Tunnel-causes-SSH-Session-to-drop

That's what I have:

  1. Lab router with one external port open and is set up to forward to my Linux box on port 22 (SSH) I am using
  2. On the client, I use Putty and set up port forwarding so to tunnel through SSH to the Windows machine's RDP port

Once connected, everything works for a couple of minutes and then the SSH connection drops. Sometimes it drops in a minutes and sometimes it takes 10 minutes to drop...but it will drop eventually.

I am using OpenSSH from the latest Ubuntu distro.

Now, if I just SSH and never attempt to run the RDP client then the SSH session remains connected for a long time.

Any thoughts?! This is upsetting me, as I cannot work remotely.

Thanks.

Elias Bachaalany

Posted 2014-12-13T01:53:29.493

Reputation: 121

One other hint: when I am on the same network, I can directly RDP into the Windows machine. However, while still on the same network and then SSH to the Linux box to establish the tunnels and then connect to RDP then RDP works just fine! The problem manifests when I SSH from another network (outside the lab)!!! – Elias Bachaalany – 2014-12-13T01:55:20.347

Anything in PuTTY's Event log? Or SSH server log? – Martin Prikryl – 2014-12-15T09:19:34.180

Okay, after a lot of investigation, it turned out not to be related to SSH. I exposed RDP directly to test and as it turns out, RDP's connection would drop randomly and then it would reconnect. SSH on the other hand does not tolerate connection drops.... – Elias Bachaalany – 2014-12-16T04:45:21.013

At first, I thought it could be VMWare Workstation because I am redirecting to MS Windows VM in VMWare. I plugged a physical computer with MS Windows and tried to tunnel to it and still the connection would drop, both: direct RDP exposure or again via SSH tunnel... – Elias Bachaalany – 2014-12-16T04:47:07.580

Final conclusion is that the connection is dropping frequently...I remember two years ago, I had the same set up and it was working properly. Any thoughts how to troubleshoot why the connection is dropping when lots of traffic is occurring? Thanks – Elias Bachaalany – 2014-12-16T04:48:17.790

More investigation led me to believe that it could be from the NetGear modem. When it last worked two years ago I had a router from Comcast, but recently I bought my own modem...I have to try another modem. – Elias Bachaalany – 2014-12-16T06:29:34.727

Answers

1

Ok, so it was all the problem of the Netgear router (NETGEAR N450 WiFi DOCSIS 3.0 Cable Modem Router (N450-100NAS)) rather than SSH. When I switched back to Comcast's router (the ones you can rent) then the connection stopped dropping.

Don't buy this router if you plan to expose a port from from your internal network to the world.

Elias Bachaalany

Posted 2014-12-13T01:53:29.493

Reputation: 121

Adding to the bad router list: Asus CM_32-AC2600. It turns all ports off at random points. The manufacturer claimed it should be a hardware failure, but this problem has repeated on two units that they sent me. Returning to Comcast (Xfinity in 2019) router solved all the hassle. – llinfeng – 2019-07-09T13:24:12.170