The remote SSH server could be a Microsoft Windows system running SSH server software, such as OpenSSH for Windows, CopSSH, WinSSHD, etc. or it could be a Unix, Linux, Mac OS X system, etc.
To configure the local system on which you are running PuTTY for port forwarding an RDP connection, take the following steps in PuTTY:
4389
for the source port value. For
the Destination field, put 127.0.0.1:3389
, if the
remote system to which you wish to establish the RDP connection is using
the default RDP listening port. Then click on the Add button192.168.0.6:3389
,
if you wish to have the remote SSH server forward the RDP traffic it
receives to another system.
You can now establish the SSH connection to the remote system. Once the SSH session is established, you then act as if you are establishing an RDP connection to the system on which you are running PuTTY, but when you do so the RDP connection is port forwarded to the remote SSH server, which if it is the target RDP server will respond to the RDP connection or if it in turn was configured to forward the RDP connection to another system, e.g., in the case above where the RDP server was at 192.168.0.6, will forward the RDP connection from itself to that other system.
Let's say rather than using the default port of 3389 for RDP on the system
running PuTTY I used port 4389. If I wanted to connect to the console
of the remote RDP server from a command line, I could use the
mstsc
command available at the command prompt on Microsoft
Windows XP and later systems to establish the connection as shown below:
mstsc /admin /v:127.0.0.1:4389
Note: if you are unfamiliar with the mstsc
command, you
can type mstsc /?
at a command prompt to see the options
available for it. Use /admin
when you are running the
command from a Windows XP system to establish a connection to the console
session of a server, but if you run the mstsc
command from
Windows Small Business Server 2003 system, use /console
, instead
of /admin
. In both cases you use /v:127.0.0.1
,
because you need to establish a connection to the local system from which
you established the PuTTY SSH connection. Put a colon and the port number
you used for the source port in PuTTY after the 127.0.0.1
, e.g.
127.0.0.1:4389
. The port number is for the local system and
it will get translated to the port number you used in the
Destination field in PuTTY, which would be 3389
if the remote RDP server is listening on the default RDP port.
Created: Friday May 18, 2012