28Jun/180

How do I connect to my Windows server via RDP?

This tutorial will show you how to connect to your Windows VPS or dedicated server at Contabo via RDP from different operating systems.

The following scenarios will be covered:

Connections from desktop operating systems:

  • Establishing a RDP connection from WindowsOS (e.g. Windows 7, 8, 10)
  • Establishing a RDP connection from LinuxOS (e.g. Debian, Ubuntu)
  • Establishing a RDP connection from MacintoshOS (e.g. Apple MacBook)

Connections from mobile devices:

  • Establishing a RDP connection from Android based systems (e.g. Samsung Galaxy)
  • Establishing a RDP connection from iOS based systems (e.g. Apple iPhone)

 

RDP connections from Windows
  • on Windows 7: Please navigate to the "Start icon" of the taskbar and search for "Remote Desktop Connection"
  • bei Windows 8/10: Please navigate to the "Windows icon" of the taskbar and search for "Remote Desktop Connection"

The RDP client should start as follows:

Now you should be able to connect to your server using its hostname (e.g. "vmiXXXXX.contaboserver.net" for VPS or "mXXXX.contaboserver.net" for dedicated servers) or the IP address (e.g. "173.xxx.xxx.xxx"). The RDP session will be established within a few seconds automatically.

Alternatively, you might choose a few options beforehand (e.g. screen resolution and audio settings). Therefore, please click on the "Show Options" button:

Explanations:

  • The screen resolution can be individually modified using the slider
  • If you would like to pass through the audio signal to your local PC, you have to set the "Remote audio playback" function to "Play on this computer"
  • If you would like to make your local printer available on your server, please enable the "Printer" option at the "Local devices and resources" section (Important: The printer device driver must be compellingly installed on your server!)
  • The clipboard is enabled by default, so STRG + C / STRG + V will always work. It can be disabled by disabling its checkbox

 

Troubleshooting:

If you determine issues while connecting to your server, please find enclosed some information about how to fix them:

1. "Remote Desktop can't connect to the remote computer for one of these reasons":

Causes / Solutions:

2. "The remote session was disconnected because there are no Remote Desktop Licence Servers available to provide a license. Please contact the server administrator."

Causes / Solutions:

Obviously, a terminal service was installed on your server and no active licence server has been assigned yet. After the grace period of 90 respectively 120 days, all temporarily licences will be deleted and all further RDP logins will be rejected.

To fix this issue, you either have to delete the terminal service or the affected Windows Registry key

  • If you rent a VPS, you can connect to your server through VNC to perform the required steps:

https://contabo.com/?show=tutorials&tutorial=vnc-connect-vps

  • If you use a dedicated server and you do not have a KVM device attached to your server yet, please get in contact with us at support@contabo.com

* The required server role "Remote Desktop Services" can be deleted at the server manager ("Remove roles and features")
* The affected Registry key can be deleted at the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Important: Please be careful while changing settings at the Windows registry! Please create a full backup of the registry beforehand.

* Now please perform a reboot of your server and you should be able to login to your server afterwards again

 

RDP connection from Linux

Alternatively, you can also connect from Linux to your Windows server via RDP. There is a command line based program called "rdesktop" and it is usable for all available linux distributions.

  • Installation:

sudo apt-get install rdesktop

  • Start the RDP connection:

rdesktop <IP address>

Now the RDP connection has been established and you can login to your server using the initial login credentials.

Important information:

  • In order to be able to establish a RDP connection, your Linux system must have an X11 server available. It should be installed by default if you already use a GUI (graphical desktop environment - e.g. "Gnome" or "KDE")
  • Please note, it is generally not recommended to establish a RDP connection through SSH
  • Alternatively, there is another program called 'freeRDP', which can be used instead of 'rdesktop'. Please find more information about it at http://www.freerdp.com/

 

RDP connection from MacOS

In order to be able to establish a RDP connection from MacOS based systems (e.g. Apple MacBook), a RDP client is also required. Please find enclosed a download URL to get the latest RDP client version:

https://itunes.apple.com/us/app/microsoft-remote-desktop/id715768417?mt=12&ign-mpt=uo%3D4

Afterwards, you can start the RDP client following by entering the Windows login credentials (at the "Domain:" field, you can either use the server's IP address or the hostname):



Please always use the latest RDP client version from iTunes, so it is ensured that no connection issues occur!

Troubleshooting:

1. "Remote Desktop Connection cannot verify the identity of the computer that you want to connect to":

=> This kind of error message is mostly caused by an old respectively outdated RDP client version

Causes / Solutions:

  • Please make sure, that you are currently using the latest RDP client version (download-URL above)

 

RDP connection from Android-based systems

To establish a RDP connection from Google-Android-based systems (e.g. Samsung Galaxy) please use the following RDP client directly from the Google App store. You can always download the latest RDP client version here:

https://play.google.com/store/apps/details?id=com.microsoft.rdc.android&hl=en

 

RDP connection from iOS-based systems

Last of all, we would like to inform you about the possibility of how to connect to your Windows server via an iOS-based system (e.g. Apple iPhone).

Please find enclosed the download URL to get the latest RDP client version:

https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092?mt=8&ign-mpt=uo%3D4

Very important: In order to use the latest RDP client above, iOS version 8.0 is required at least!


If you have any further questions about connecting via RDP to your server or need help, please do not hesitate to contact us at support@contabo.com.

26Nov/152

How to reset root/Administrator password in Linux/Windows

Before we are going to explain how you can reset the system password of one of your servers manually, we would like to draw your attention to the task "Password reset", which is available in your Contabo customer control panel. This task could save you the effort explained in this tutorial in many cases. With it you can also reset the system password but only for the user "root" (Linux) or "Administrator" (Windows). The task "Password reset" is available in your Contabo customer control panel for Dedicated Servers in the "Server control" and for VPS in the "VPS control" after hovering the pointer over the "Manage" button. In some cases the manual approach described in this tutorial can be helpful anyway, for example, if you need to change passwords for user accounts with different user names other than "root" (Linux) or "Administrator" (Windows).

First of all, please read the following important instructions about this tutorial:
Please note, during this tutorial you are going to advance deeply into your operating system, so we kindly ask you to be careful while running these commands. Furthermore, we ask for your understanding that Contabo is not liable for damages or data loss of your operating system.

Please also be informed that this tutorial is not working on Dedicated Servers with Windows operating systems without a KVM over IP device. We kindly ask you to open a ticket at support@contabo.com if we should assist you.

This tutorial offers the opportunity to reset the system password for the "root" and "Administrator" users, so you should be able to log on to your server again in case you have lost or forgotten the password.

Please go to your Contabo customer control panel for performing a reboot of your VPS or Dedicated Server into the rescue mode. To do so, you have to navigate to "Your services" in the menu on the left, followed by "Manage", then choose "Rescue System".

(The login credentials of your customer control panel have been sent in our initial e-mail to your authorized e-mail address.)

Kundenlogin2

Password reset for Linux:

1. List system partitions:

root@sysresccd /root % fdisk -l
....
Device     Boot     Start         End      Blocks   Id  System
/dev/sda1  *         2048   961146879   480572416   83  Linux
/dev/sda2       961146880   976771071     7812096   82  Linux swap / Solaris
....

2. Mount system partitions:

root@sysresccd /root % mkdir /mnt/sda1
root@sysresccd /root % mount /dev/sda1 /mnt/sda1

3. Now you can change to the mounted environment:

root@sysresccd /root % chroot /mnt/sda1 /bin/bash

4. Reset the root password:

root@sysresccd:/# passwd root
Enter new UNIX password: <new password>
Retype new UNIX password: <new password>
passwd: password updated successfully

5. The root password has been changed, please exit the rescue mode and reboot your server back to the operating system:

root@sysresccd:/# exit
exit
root@sysresccd /root % reboot

Now you should be able to login using the new password.

 

Password reset for Windows:

1. List system partitions:

root@sysresccd /root % fdisk -l
....
Device     Boot  Start       End   Sectors   Size Id Type
/dev/vda1  *      2048    718847    716800   350M 27 Hidden NTFS WinRE
/dev/vda2       718848 629143551 628424704 299.7G  7 HPFS/NTFS/exFAT
....

2. Mount system partitions:

root@sysresccd /root % mkdir /mnt/vda2
root@sysresccd /root % ntfs-3g /dev/vda2 /mnt/vda2

Please note: If now an error message appears, please enter the following command before you are going to mount the system partition:

root@sysresccd /root % ntfsfix /dev/vda2

Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/vda2 was processed successfully.

3. Now you can change to the system directory:

root@sysresccd /root % cd /mnt/vda2/Windows/System32/config

4. Print all system users:

root@sysresccd /root/mnt/vda2/Windows/System32/config % chntpw -l SAM

chntpw version 1.00 140201, (c) Petter N Hagen
Hive <SAM> name (from header): <\SystemRoot\System32\Config\SAM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
File size 262144 [40000] bytes, containing 8 pages (+ 1 headerpage)
Used for data: 302/27480 blocks/bytes, unused: 28/5032 blocks/bytes.

| RID -|---------- Username ------------| Admin? |- Lock? --|
| 01f4 | Administrator                  | ADMIN  |          |
| 01f5 | Guest                          |        | dis/lock |

5. Reset the Administrator password:

root@sysresccd /root/mnt/vda2/Windows/System32/config % chntpw SAM -u Administrator

chntpw version 1.00 140201, (c) Petter N Hagen
Hive <SAM> name (from header): <\SystemRoot\System32\Config\SAM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
File size 262144 [40000] bytes, containing 8 pages (+ 1 headerpage)
Used for data: 302/27504 blocks/bytes, unused: 28/5008 blocks/bytes.

================= USER EDIT ====================

RID     : 0500 [01f4]
Username: Administrator
fullname:
comment : Built-in account for administering the computer/domain
homedir :

00000220 = Administrators (which has 1 members)

Account bits: 0x0010 =
[ ] Disabled        | [ ] Homedir req.    | [ ] Passwd not req. |
[ ] Temp. duplicate | [X] Normal account  | [ ] NMS account     |
[ ] Domain trust ac | [ ] Wks trust act.  | [ ] Srv trust act   |
[ ] Pwd don't expir | [ ] Auto lockout    | [ ] (unknown 0x08)  |
[ ] (unknown 0x10)  | [ ] (unknown 0x20)  | [ ] (unknown 0x40)  |

Failed login count: 0, while max tries is: 0
Total  login count: 82

- - - - User Edit Menu:
1 - Clear (blank) user password
(2 - Unlock and enable user account) [seems unlocked already]
3 - Promote user (make user an administrator)
4 - Add user to a group
5 - Remove user from a group
q - Quit editing user, back to user select
Select: [q] > 1

Password cleared!
================= USER EDIT ====================

RID     : 0500 [01f4]
Username: Administrator
fullname:
comment : Built-in account for administering the computer/domain
homedir :

00000220 = Administrators (which has 1 members)

Account bits: 0x0010 =
[ ] Disabled        | [ ] Homedir req.    | [ ] Passwd not req. |
[ ] Temp. duplicate | [X] Normal account  | [ ] NMS account     |
[ ] Domain trust ac | [ ] Wks trust act.  | [ ] Srv trust act   |
[ ] Pwd don't expir | [ ] Auto lockout    | [ ] (unknown 0x08)  |
[ ] (unknown 0x10)  | [ ] (unknown 0x20)  | [ ] (unknown 0x40)  |

Failed login count: 0, while max tries is: 0
Total  login count: 82
** No NT MD4 hash found. This user probably has a BLANK password!
** No LANMAN hash found either. Try login with no password!

- - - - User Edit Menu:
1 - Clear (blank) user password
(2 - Unlock and enable user account) [seems unlocked already]
3 - Promote user (make user an administrator)
4 - Add user to a group
5 - Remove user from a group
q - Quit editing user, back to user select
Select: [q] > q

Hives that have changed:
#  Name
0  <SAM>
Write hive files? (y/n) [n] : y
0  <SAM> - OK

6. The Administrator password has been changed, you can check this as follows:

root@sysresccd /root/mnt/vda2/Windows/System32/config % chntpw -i SAM

===== chntpw Edit User Info & Passwords ====

| RID -|---------- Username ------------| Admin? |- Lock? --|
| 01f4 | Administrator                  | ADMIN  | *BLANK*  |
| 01f5 | Guest                          |        | dis/lock |

Please enter user number (RID) or 0 to exit: [1f4] 0

Please note: The *BLANK* entry indicates, that currently no Administrator password is set!

7. Exit the rescue mode and reboot your server back to the operating system:

root@sysresccd /root % reboot

8. Last of all, you can login to your server via VNC without password for setting a new password. Therefore, please choose one of the following options:

(The login credentials of your VNC access have been sent in our initial e-mail to your authorized e-mail address)

1st option:

Control panel > User accounts > User accounts > Manage accounts > Change account > Create password

Windows-PW setzen (klein)

2nd option:

Please open the command prompt on the desktop and enter the following command:

C:\Users\Administrator> net user Administrator <password>

Screenshot EN

A new password has been created, it is valid for the "Administrator" user account from now on.

Posted by: Benjamin | Tagged as: , , , , , 2 Comments