Connecting to a Windows server via Remote Desktop

Step-by-step guide to connecting to Windows Remote Desktop from Windows, Mac, and mobile; along with security settings, troubleshooting common errors, and optimizing the RDP port.

7 min Updated 14 Aug 2026

Why is Windows Remote Desktop Still the Best Option?

When it comes to managing a Windows server, Windows Remote Desktop (Remote Desktop Protocol or RDP) remains the fastest and most lightweight way to access the graphical environment. Unlike third-party tools that require installing an agent on the server, RDP is enabled by default on Windows Server, and with just a few simple settings, you can connect to it from anywhere in the world.

In this article, you will learn how to connect to your Windows server from different operating systems (Windows, Mac, Linux, and mobile), secure the RDP port, and fix the most common connection errors. Whether you are a beginner or have been working with RDP for years, the tips in this guide will be useful to you.

Prerequisites for Connecting to Windows Remote Desktop

Before doing anything, check the following:

  • Server Public IP: If your server is behind NAT, you need to know the public IP and the forwarded port.
  • Username and Password: The user account must be a member of the Remote Desktop Users group.
  • Access to Port 3389: The server firewall and network firewall (such as Security Group in the data center) must have this port open.
  • Windows Version: RDP is enabled on all versions of Windows Server (2012, 2016, 2019, 2022) and even Windows 10/11 Pro.

Enabling RDP on the Server

If RDP is disabled, follow these steps:

  1. Open Server Manager and select the Local Server option.
  2. Click on the Remote Desktop option and check Enable Remote Desktop.
  3. In the window that opens, select Allow connections from computers running any version of Remote Desktop (for better security, keep the Network Level Authentication option enabled).
  4. Click OK and apply the changes.

To make sure the service is running, run the following in PowerShell:

Get-Service TermService | Select-Object Status, Name

The output should be Running.

Connecting from Windows to Windows Remote Desktop

The simplest case is connecting from another Windows system. The built-in tool mstsc (Remote Desktop Connection) is sufficient.

Connection Steps

  1. Press Win + R and type mstsc.
  2. In the Computer field, enter the server IP or domain name (e.g., 185.10.20.30).
  3. Click Show Options and enter the username.
  4. Click Connect and enter the password.

To save the connection settings, you can create an .rdp file so that next time you can connect with just a double-click.

Connecting with a Non-Standard Port

If you have changed the RDP port (e.g., to 3390), you need to enter it as IP:Port:

185.10.20.30:3390

This is done in the Computer field of the same mstsc window.

Connecting from Mac to Windows Remote Desktop

Microsoft has released the official Microsoft Remote Desktop application for macOS, which can be installed from the Mac App Store.

Installation and Configuration

  1. Install the application from the App Store.
  2. Click + and select the Add PC option.
  3. In the PC name field, enter the IP and port (e.g., 185.10.20.30:3390).
  4. Enter the username in the User account section.
  5. Click Save and then double-click the connection icon.

Note: If you are using a Mac with an Apple Silicon chip, the application runs natively and performs very well.

Connecting from Mobile (Android and iOS)

To manage your server from your phone, the official Microsoft Remote Desktop application is available on Google Play and the App Store.

Recommended Settings for Mobile

  • In the Display section, set the resolution to Default so it adapts to your phone screen.
  • Enable the Use mouse input option so you can perform right-click and scroll with touch.
  • When connecting from public networks, be sure to use a VPN.

On Android, you can use the PCs feature in the main menu to save the server and connect with a single tap.

Securing the RDP Port and Preventing Attacks

Port 3389 is one of the most frequent targets of Brute Force attacks. If your server has a public IP, be sure to take the following measures:

Changing the Default RDP Port

By changing the port, you render a large portion of automated scans ineffective. To do this:

  1. Open the registry: regedit
  2. Navigate to the following path:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
  1. Change the PortNumber value from Decimal to your desired number (e.g., 3390).
  2. Restart the server.

After doing this, be sure to open the new port in the firewall.

Enabling Network Level Authentication (NLA)

NLA ensures that authentication is performed before a full connection is established, preventing many attacks. To enable it:

  1. Open gpedit.msc.
  2. Navigate to the following path:
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security
  1. Set Require user authentication for remote connections by using NLA to Enabled.

Restricting Allowed IPs

In Windows Firewall (Windows Defender Firewall), you can edit the RDP rule and allow only specific IPs to connect:

netsh advfirewall firewall set rule name="Remote Desktop" new remoteip=192.168.1.0/24,185.10.20.0/24

This command only allows two specific networks to connect.

Using Account Lockout Policy

To prevent Brute Force attacks, enable account lockout after several failed attempts:

  1. Open secpol.msc.
  2. Go to Account Policies > Account Lockout Policy.
  3. Set the Account lockout threshold value to 5.

This will lock the account for 30 minutes after 5 failed attempts.

Troubleshooting Common Errors in Connecting to Windows Remote Desktop

In this section, we will examine the most frequent problems users encounter.

Error: "This computer can't connect to the remote computer"

This error is usually due to a closed port or firewall. Check the following:

  • Test the port from your system with the following command:
Test-NetConnection 185.10.20.30 -Port 3389

If the output is not TcpTestSucceeded : True, the port is not open in the server firewall or network.

  • In the Windows server firewall, check that the Remote Desktop rule is enabled for the Public profile.
  • If the server is in a data center, be sure to check the Security Group or Access Control List.

Error: "The remote session was disconnected because of an error in the licensing protocol"

This error is usually due to the limit on the number of concurrent sessions. If you are using Windows Server with a standard license, only 2 concurrent sessions are allowed. Solution:

  • Close inactive sessions.
  • Use qwinsta in Command Prompt to view active sessions:
qwinsta
  • Close the disconnected session with the following command:
logoff 1

Replace the number 1 with your own Session ID.

Error: "Your credentials did not work"

This error is often due to NLA or a problem with the username. Try the following:

  • Enter the username in the format SERVERNAME\Username.
  • If you are using a Microsoft account, enter the full email address.
  • Temporarily disable NLA to see if the problem is related to it.

Optimizing the Windows Remote Desktop Experience

For working with a server remotely, a few simple settings can noticeably improve speed and quality.

Reducing Bandwidth Consumption

In the mstsc window, go to the Experience tab and select the Slow connection option. This disables wallpaper, animations, and heavy fonts.

Using Clipboard and Drive Redirection

In the Local Resources tab, enable the Clipboard option to copy text between your local system and the server. To transfer files, check the Drives option so that local drives are mounted on the server.

Connecting via RD Gateway

If your server is behind a corporate firewall, using RD Gateway is more secure than opening port 3389. This service can be installed on Windows Server and tunnels RDP traffic over HTTPS (port 443). In this case, there is no need to open port 3389 on the internet, and the connection is made through a browser or a standard RDP client.

Summary

Windows Remote Desktop is a powerful yet simple tool for managing Windows servers. By following security best practices such as changing the port, enabling NLA, and restricting IPs, you can securely connect to your server from any device. If you are looking for a stable infrastructure for your Windows servers, ServerNet's dedicated and cloud servers with RDP support can be a suitable option.

Finally, always back up your server before changing security settings and apply changes during low-traffic periods. If you encounter a connection error not covered in this article, check the exact error details and Event Viewer logs to find the root cause.

Was this page helpful?