I regularly use SSH to connect to customer systems and tunnel various different sorts of traffic through it (Telnet, ODBC, RDP etc). In certain cases, I have no other method of remote access to systems other than SSH.
This has not been a problem until I recently upgraded to Windows Vista which includes remote desktop connection v6, which will not allow connections to 127.0.0.1 on any port, it complains with the error message:
“The client could not connect. You are already connected to the console of this computer. A new console session cannot be established”
Which of course is true, if I were trying to connect to 3389.
So today after spending significant effort in the last couple of months I have found a simple solution to the problem:
- Instruct your SSH client to listen on all interfaces for connections. For command line this means adding “-g” to your connection. I am using putty so ticking the box that says “local ports accept connections from other hosts” under Connection/SSH/Tunnels will do the job.
- In the remote desktop client use 127.0.0.2 as the destination host and it will then happily pass through any tunnels you have created. For example 127.0.0.2:3390
I realize there probably are not that many people out there using SSH to tunnel RDP, but if you are then RDP 6 has been a real pain until now.