Remote Desktop

Microsoft Remote Desktop provides remote connection to machines that support the remote desktop protocol (RDP). The remote desktop client is available in most windows installations by default.

To start the remote desktop client:

Start > Run > mstsc

To enable remote desktop:

Control Panel > System > Remote

Select the Allow users to connect remotely to this computer and select the appropriate users. To check that you will be able to access the your computer externally via the Internet, go to Shields Up, press proceed and perform a user specified custom port probe on port 3389 which is the default remote desktop protocol - RDP port.

As the remote desktop port is widely known, for security you can change the port to any other free TCP port (usually above 1024). This Microsoft KB article explains how to change the listening port with a registry change.

The registry key to change the port number is located under:

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

Troubleshooting Connectivity

The remote desktop server refers to the machine you are attempting to remote desktop to (e.g. your work PC). The remote desktop client refers to the computer you are connecting from (e.g. your home PC).

The key to establishing a remote desktop connection is to ensure that the remote desktop port is open and listening.

Remote desktop server

On your remote desktop server (e.g. work PC), type the following into command line to check that your remote desktop server is listening (replace port 3389 with your listening port if you have changed this):

$ netstat -a | find "3389"

If you get a line returned like this:

TCP   HOSTNAME:3389      HOSTNAME.somedomain.com:0  LISTENING

This means that your remote desktop server is listening on port 3389 (the remote desktop port) for remote desktop connections. Your remote desktop server is up.

However you may have a firewall blocking the port. Check your windows firewall settings by right clicking on your network connection icon in the system tray and selecting change firewall settings or through Control Panel > Network Connections > Properties of the appropriate network connection > Advanced > Windows Firewall > Settings button.

In the exceptions tab, make sure you have Remote Desktop selected. When you press edit you should see TCP 3389 and scope of Any.

windows-firewall-settings.png

Note that if these are greyed out, windows firewall is off (but you may still be behind a network/corporate firewall).

Remote desktop client

On your remote desktop client (e.g. home PC) establish any connections that you may need to your remote desktop server network (e.g. through VPN software).

Go to the command prompt and attempt a telnet connection on the remote desktop port (e.g. 3389):

$ telnet <your-remote-desktop-server-ip> 3389

If you get a blank screen with a flashing cursor - you are in. You should now be able to connect using remote desktop itself.

If not, this is more than likely a firewall issue. Something is blocking your client connecting to your server. This is probably happening on your remote desktop server network (not the server itself). You need to establish whether a network/corporate firewall is blocking the remote desktop port, and perhaps change that port to something that is not blocked.

Enabling Remote Desktop Clipboard

If you use remote desktop, then chances are you'll want to share the clipboard between your machine and your remote machine. Sometimes this just works, but chances are if you're like me, it doesn't just work. If that's case here's what you need to do.

Firstly, I use a clipboard manager - ClipX. If you don't already use a clipboard manager, then I highly recommend it, trust me, you won't know how you ever did without one! Having a history of the last 30 items that you've stored in your clipboard can do wonders for your productivity. Plus the other great thing about ClipX is that it seems to work fine with remote desktop clipboard sharing :)

What you need to do when you remote connect (on your local PC)

Start > Run > mstsc.exe

  1. Click the Options button
  2. Move to the local resources tab
  3. Check the Clipboard box
  4. Back to General and Save

What you need to do on remote desktop machine:

Start > Run > rdpclip.exe

That's it. I suggest creating a shortcut to rdpclip.exe in your start up folder so its always running.

There are other sites out there that tell you to turn on services (e.g. Network DDE DSDM, Network DDE, Clipbook) but that doesn't seem to be necesssary. You also only need rdpclip.exe running on the remote machine (not on the local one).

Also something to note - if you're having intermittant issues with your remote clipboard, try killing rdpclip.exe through task manager and restarting it.

Remote Desktop Resources

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License