Karl's Windows Admin Tips & Tricks

Jun 9 2011   11:40AM GMT

Enabling Remote Desktop on a Remote Server.

Karl Gechlik Karl Gechlik Profile: Karl Gechlik

I use remote desktop or RDC hundreds of times a day. Without being able to “remote” into my servers I would be running around non-stop. Well actually I would still be using PcAnywhere and Dameware to control my boxes. What do we do if we have a server, on the network, that you need to have remote access to and you don’t? You forgot to enable remote desktop and now you are seeing that familiar error message telling you that you do not have the rights to log on.

If you were sitting in front of the computer you could right click on my computer choose properties than navigate to the remote tab and click the little check box next to enable remote desktop. But we are not, so we will need to work a little “admin” magic by remotely editing the servers registry and then remotely rebooting it.

When the server comes back up we will have full remote desktop access to it. Let’s see how we can do this:

  1. First log on to another machine on your network.
  2. Open Regedit
  3. Click File –> Connect netowrk registry.
  4. Type in the servers name or IP address.
  5. Click OK
  6. Browse to the Hot Key Local Machine hive on the server in questions registry
  7. Locate the following key: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
  8. Click on it to show its keys.
  9. Look through the keys for the REG_DWORD value called fDenyTSConnection.
  10. Double-click on the value.
  11. Edit the DWORD Value box and change the value data from 1 Remote Desktop will be disabled to 0 (Remote Desktop is enabled.
  12. We need to restart the remote machine using the command line. Launch CMD and type in this command: shutdown -m \\servername -r -t 00
    That's it when the server restarts you will be able to log in to it via remote desktop.

If you are curious about the shutdown command the -m allows for you to shut down a remote machine and is followed by the computers name then – r sets the reboot option and the t 00 tells it to wait 0 seconds before it starts the reboot.  If you do not specify the t 00 it will wait 30 seconds before starting the restart.

Do you have another method for getting a server accessible via remote desktop without physical access to the machine? We would love to hear about it in the comments!

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: