Remote desktop connection using an SSH tunnel is a well known method to connect to remote PC’s when an SSH server available on the same network.
This serves as an alternative to VPN and is secure as all data is sent encrypted through the ssh tunnel.
On my openSUSE laptop, I use the following command to connect to an SSH server (sshserver) and create an tunnel between the remote desktop port of my Windows XP machine (workpc) and local port 3389.
ssh -C -L 3389:workpc:3389 vimal@sshserver
-C option enables compression and
-L is used to specify the
local port that will be used for the remote desktop connection. IP
addresses should be used for
sshserver if host names
cannot be resolved.
Once connected, a remote desktop client like rdesktop or krdc can be used to connect to the session. For example, using rdesktop the following command can be used:
rdesktop -f -k en-gb localhost:3389&
-f starts rdesktop in full screen mode,
-k is used to specify
the keyboard layout.
Okay, how to do this on Android?
I knew about applications that can be used for the tasks above - ConnectBot can do SSH connections and Remote RDP Lite can be used for making a remote desktop connection. But I was skeptical if the port forwarding can be done and also if the remote desktop would be any good on a small screen - my Motorola Milestone. Here is how I got it to work.
Install both applications mentioned above. They are available in the Google Play Store.
Open ConnectBot and make the ssh connection:
Type in and click done. If the SSH port is different, it can be specified as:
Once connected, click and hold on the connection in the hosts screen. You will be presented with an option to ‘Edit port forwards’
Access the menu and choose ‘Add port forward’ and fill in details similar to this:
Nickname: work Type: Local Source port: 3389 Destination: workpc:3389
Save it. Disconnect and connect again to make the port forward to come into effect.
Once connected, open Remote RDP Lite and make a connection as follows:
Host: localhost Port: 3389
Go back and select
@localhost or whatever you named it. You should
get to the login screen. The touch screen works and you can use it as
the mouse and the keyboard works too! The mouse functions are a bit
tricky because of the small screen. Here are some screenshots.
ConnectBot Hosts Screen
ConnectBot – Editing port forwards
Remote RDP Lite – Connection screen