On Windows 10 or Windows 11, use the built-in Remote Desktop Connection (MSTSC) to connect to your instance. On macOS, use the Windows App.
We recommend connecting to your Alibaba Cloud instances by using Workbench. It provides browser-based, password-free logon and is more convenient than MSTSC and Windows App.
Usage notes
The instance runs Windows.
The instance has a static public IP address or an Elastic IP Address (EIP).
Method 1: Use Remote Desktop (for Windows)
Before you begin
Instance public IP address: In the ECS console - Instances, find and click the target instance to open its details page. In the Configuration Information section, find the Public IP Address.
Instance logon credentials: Set a password for the instance.
Security group configuration: For the Security Group associated with the instance, configure an inbound rule that allows your local IP address to access the instance over Remote Desktop Protocol (RDP), with port 3389.
Procedure
Launch Remote Desktop Connection.
Press
Win+R
, typemstsc
, and pressEnter
to open the Remote Desktop Connection tool.Configure the connection.
In the Computer text box, enter the public IP address of the instance.
Initiate the connection and enter the password.
Click Connect. In the dialog box that appears, enter the User name (default: Administrator) and Password, and then click OK.
A certificate warning may appear that says, "The identity of this remote computer cannot be verified." Click Yes to trust the certificate.
Log on successfully.
Wait for the connection to complete. The desktop of the Windows instance appears.
Method 2: Use the Windows App (for macOS)
Before you begin
Search for and install the Windows App from the App Store.
Instance public IP address: In the ECS console - Instances, find and click the target instance to open its details page. In the Configuration Information section, find the Public IP Address.
Instance logon credentials: Set a password for the instance.
Security group configuration: For the Security Group associated with the instance, configure an inbound rule that allows your local IP address to access the instance over RDP (port 3389).
Procedure
Start the Windows App.
In the navigation pane on the left, click Devices. Then, in the upper-right corner, click
. The Add PC dialog box appears.Configure the connection.
In the PC name text box, enter the public IP address of the instance and click Add.
Initiate the connection.
In the navigation pane on the left, click Devices. Double-click the connection card for the newly created PC.
Enter your credentials.
In the Enter Your Credentials dialog box that appears, enter the Username (default: Administrator) and Password, and then click Continue.
If a certificate security warning appears, click Continue to trust the certificate.
Log on successfully.
Wait for the connection to complete. You are redirected to the desktop of the Windows instance.
Apply in production
Modify the default RDP port
Change the default RDP port 3389 to a high-numbered, non-standard port, such as 33890. This reduces the risk of automated scanning and brute-force attacks.
Allow traffic on the new port: Add an inbound rule to the instance's security group to allow inbound traffic on the new port.
Modify the service port: Log on to the instance and modify the port in the registry.
Press
Win+R
, typeregedit
, and pressEnter
to open the Registry Editor.Navigate to the path
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
.Find the
PortNumber
value. Right-click it and select Modify. In the dialog box that appears, change the base to Decimal and enter the new port number.Press
Win+R
, typeservices.msc
, and pressEnter
to open the Services window. Find and right-clickRemote Desktop Services
, and then select Restart to apply the changes.
Connect using the new port: To connect by using the new port, specify it after the instance's public IP address in the following format:
<Public IP>:<Port number>
.
Authorize only trusted IP addresses to access the instance
Modify the security group rules to allow access to the instance's RDP service port (default: 3389) only from your local IP address or other trusted IP addresses. This blocks access from unknown hosts.
FAQ
How do I configure a security group rule to allow traffic on port 3389?
Add an inbound rule to the instance's security group:
Action
Protocol
Source
Destination (This Instance)
Allow
Custom TCP
Enter the public IP address of your local client.
ImportantIf you set the source to
0.0.0.0/0
, you allow access from any IP address, which poses a security risk. Use this value with caution.RDP(3389)
If you changed the RDP service port of the instance, update this to the actual port number.
After I initiate a connection, it times out and fails to connect. What should I do?
This means the client cannot connect to the server. Check the following in order:
Verify that the public IP address is correct.
Check if the security group allows traffic on the required port.
Ensure the instance is running.
Use the ECS console - Self-service Troubleshooting tool to troubleshoot the issue.
How do I transfer files using MSTSC or the Windows App?