EN

Windows Server

Connect to a Windows server over RDP

Connect to your Windows server with Remote Desktop (RDP) from Windows, macOS or Linux: credentials, certificate, security and fixes for common errors.

8 min read, updated on 18 November 2026

On this page

Your values

Enter them once and the commands in this guide update.

The Remote Desktop Protocol (RDP) displays your Windows server's desktop on your computer. You use it with your mouse and keyboard, as if the machine were in front of you.

By the end of this guide, you will be connected to your server from Windows, macOS or Linux, and you will know how to fix the most frequent errors.

Prerequisites

  • A VPS or dedicated server running Windows Server, already installed. If it is not, follow Install Windows on a VPS, including the initial setup
  • The server's IP address, the login and the password
  • A computer running Windows, macOS or Linux

Step 1: find your connection details

They are in the email sent to the address of your HostMyServers account, in the Information de connexion (Connection information) section:

Information Example or location
IPv4 Also shown in your client area, Vue générale (Overview) tab of the service
Login For example Administrateur
Mot de passe (Password) In the email
Port RDP (RDP port) 3389

If you cannot find this email, check your spam folder, then open a ticket from your client area.

In this guide, replace YOUR_SERVER_IP with the IPv4 address and YOUR_USER with your login.

Step 2: connect

Follow the section that matches your computer.

From Windows

The Remote Desktop Connection app is already installed.

  1. Press Windows + R, type mstsc, then confirm.
  2. In Computer, enter YOUR_SERVER_IP.
  3. Click Show Options, then enter your login in User name.
  4. Click Connect and enter the password.
  5. If Windows suggests your local account, click More choices, then Use a different account.

You can also start the connection from PowerShell:

PowerShell
mstsc /v:YOUR_SERVER_IP

If the port has been changed, add it after the address, for example YOUR_SERVER_IP:3390.

From macOS

Microsoft provides Windows App, which replaces the former Microsoft Remote Desktop app.

  1. Install Windows App from the Mac App Store, then open it.
  2. In the Devices tab, click +, then Add PC.
  3. In PC Name, enter YOUR_SERVER_IP.
  4. Click Add.
  5. Double-click the server, then enter your login and password.

From Linux with Remmina

Remmina is a graphical application. On Debian or Ubuntu:

Terminal
sudo apt install remmina remmina-plugin-rdp
  1. Open Remmina and click + to create a profile.
  2. In Protocol, choose RDP.
  3. In Server, enter YOUR_SERVER_IP:3389.
  4. Fill in Username. If you leave Password empty, Remmina asks for it when connecting.
  5. Click Save, then double-click the profile.

From Linux with FreeRDP

FreeRDP runs from the command line. On Debian 13 or Ubuntu 24.04:

Terminal
sudo apt install freerdp3-x11
xfreerdp3 /v:YOUR_SERVER_IP /u:YOUR_USER /cert:tofu /size:1600x900

On Debian 12 or Ubuntu 22.04:

Terminal
sudo apt install freerdp2-x11
xfreerdp /v:YOUR_SERVER_IP /u:YOUR_USER /cert:tofu /size:1600x900

Enter the password when prompted rather than writing it in the command, where it would stay in your history. The /cert:tofu option accepts the certificate on the first connection, then refuses the connection if it changes.

Step 3: accept the certificate

On the first connection, a warning says that the server's identity cannot be verified. This is usual: by default, Windows Server uses a certificate it signed itself.

For a full check, compare the fingerprint displayed with the one on the server. On a VPS, read it from the NoVNC console. If your plan does not include this console, ask support how to obtain it.

  1. In your client area, open your service page and click the terminal-shaped icon at the top right.
  2. Choose NoVNC Console graphique (NoVNC graphical console), confirm with Ok, then click Connecter (Connect).
  3. Sign in, open PowerShell as administrator, then run:
PowerShell
Get-CimInstance -Namespace root\cimv2\TerminalServices -ClassName Win32_TSGeneralSetting | Select-Object TerminalName, SSLCertificateSHA1Hash
  1. On Windows, in the warning, click View certificate, open the Details tab, then compare the Thumbprint field.

If the values match, accept the connection. Otherwise, refuse it and check the IP address.

Step 4: check the connection

The server's Windows desktop appears. Open PowerShell on the server and run:

PowerShell
whoami
hostname
query user

These commands display your account, the server name and the open sessions.

Closing the RDP window leaves your session open on the server, with your programs still running. To end it, open the Start menu, click your account, then Sign out.

Secure access

The RDP port is exposed to the Internet and attracts automated login attempts.

  1. Change the password you received by following Change a user password.
  2. Keep Network Level Authentication (NLA) enabled. It requires your credentials before a session is opened.
  3. Restrict the RDP port to your IP address, if it is static. Labels follow the server's language:
    1. On the server, press Windows + R, type wf.msc, then confirm.
    2. Open Inbound Rules.
    3. Double-click the Remote Desktop - User Mode (TCP-In) rule. On a French-language Windows, its name starts with Bureau à distance - Mode utilisateur.
    4. In the Scope tab, under Remote IP address, select These IP addresses, click Add, then enter YOUR_IP.
    5. Do the same for the UDP rule.

Troubleshooting

Test the RDP port

Start with this test: it tells you whether the problem comes from the network or from the Windows session.

From Windows:

PowerShell
Test-NetConnection -ComputerName YOUR_SERVER_IP -Port 3389

The line TcpTestSucceeded : True means that the port responds.

From macOS or Linux:

Terminal
nc -vz YOUR_SERVER_IP 3389

"Remote Desktop can't connect to the remote computer" or code 0x204

If the port test fails, check the following, in order:

  1. The IP address and port you entered.
  2. The server status in your client area.
  3. Your network: some corporate networks and public Wi-Fi block this port. Try from a mobile hotspot.
  4. The server itself, from the NoVNC console, in PowerShell opened as administrator:
PowerShell
qwinsta
Get-Service TermService
netstat -ano | findstr 3389

The rdp-tcp line must be in the Listen state (Écouter on a French-language Windows), the service must be Running, and port 3389 must appear as listening.

If that is not the case, re-enable Remote Desktop and its firewall rules:

PowerShell
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
Get-NetFirewallRule -DisplayGroup "Bureau à distance" | Set-NetFirewallRule -Enabled True
Restart-Service TermService -Force

On an English-language Windows, the group is called Remote Desktop.

"Your credentials did not work"

  • Retype the password by hand: one space copied by mistake is enough to get it rejected.
  • Check your keyboard layout.
  • If you changed the password, the one in the email is no longer valid.
  • Indicate that this is a local account by writing the login as .\Administrateur.

If Windows says the account is locked, wait before trying again, or sign in from the NoVNC console.

"An authentication error has occurred" with a mention of CredSSP

Your computer or the server is missing the CredSSP security updates. Install Windows updates on both sides, then restart. On the server, use the NoVNC console. Avoid disabling this protection.

The type of logon is restricted

If Windows says the system administrator has restricted the type of logon, the account you are using is not allowed to connect remotely. From an administrator session, add it to the Remote Desktop users group:

PowerShell
net localgroup "Utilisateurs du Bureau à distance" YOUR_USER /add

On an English-language Windows, the group is called Remote Desktop Users.

No Remote Desktop license server available

This message appears when the Remote Desktop Session Host role is installed without valid licenses. Connect with an administration session:

PowerShell
mstsc /v:YOUR_SERVER_IP /admin

Then add the required licenses. If you do not need more than two simultaneous connections, you can remove this role.

Another session disconnects you

Without the Session Host role, Windows Server accepts two simultaneous remote connections, and a given account resumes its existing session. List the sessions, then close the one no longer in use, replacing 2 with its ID:

PowerShell
query user
logoff 2

Unsaved work in that session will be lost.

The server shuts down by itself or reports an expired license

The instance may be at the end of its trial period. See Renew your Windows license.

The certificate warning appears again

This is expected after a reinstallation or a certificate change. In any other case, compare the fingerprint as in step 3 before accepting.

Contact support

If the problem persists, open a ticket from your client area. Include the server's IP address, the time of the attempt, the exact error message and the result of the port test, and never include a password.