This topic describes how to connect to a Windows instance from a local client.
- The instance is in the Running state. If not, you must start the instance. For more information, see Start an instance.
- A logon password is set for the instance. If you have not set a password or if you have forgotten the password, you must reset the password for the instance. For more information, see Reset the logon password of an instance.
- The instance can access the Internet:
- In a virtual private cloud (VPC), you can assign a public IP address to an instance when you create the instance and purchase bandwidth for the instance. You can also associate an elastic IP address (EIP) with an instance after you create the instance. For more information, see Create an IPv4 VPC.
- In the classic network, a public IP address is assigned to the instance by using one
of the following methods:
- If you select Assign Public IPv4 Address when you create a subscription or pay-as-you-go instance, a public IP address is assigned to the instance.
- If you do not select Assign Public IPv4 Address when you create a subscription instance, you can upgrade the bandwidth to obtain a public IP address for the instance. For more information, see Overview of instance upgrade and downgrade.
- The following security group rules are added to the security group to which the instance
belongs. For more information, see Add security group rules.
Network Type ENI type Rule direction Authorization policy Protocol type Port Authorization type Authorization object Priority VPC N/A Inbound Allow RDP(3389) 3389/3389 CIDR block 0.0.0.0/0 1 Classic network Internet
Connect from a local client that runs a Windows operating system
If the local client runs a Windows operating system, you can use the Microsoft Terminal Services Client (MSTSC) that comes with the Windows operating system to connect to a Windows instance from the local client.
- Use one of the following methods to start Remote Desktop Connection (MSTSC):
- Choose .
- Click the Start icon, enter mstsc in the search box, and then press the Enter key.
- Press Win+R to open the Run dialog box, enter mstsc, and then press the Enter key.
- In the Remote Desktop Connection dialog box, perform the following operations in sequence:
- Click Show Options.
- Set Computer to the public IP address or EIP of the instance.
- Set Username. The default username is Administrator. If you do not want to manually enter your username and password again the next time you connect to the instance, you can select Allow me to save credentials.
- Optional:If you want to copy files from your local client to the instance, click the Local Resources tab to view the options for sharing local computer resources.
- If you want to copy only text, select Clipboard.
If you want to copy files, click More..., select Drives, and then select the letters of the drives from which you want to copy files.
- Optional:If you have specific requirements on the size of the remote desktop window, click
the Display tab to resize the remote desktop window. We recommend that you use Full Screen.
- Click Connect.
- Click Show Options.
Connect from a local client that runs a Linux operating system
If the local client runs a Linux operating system, you can use a remote connection tool to connect to a Windows instance from the local client. In this example, rdesktop is used.
- Download and start rdesktop.
- Run the following command to connect to the Windows instance. This sample command is for your reference. Replace the parameters in the command based on your needs.
rdesktop -u administrator -p password -f -g 1024*720 192.168.1.1 -r clipboard:PRIMARYCLIPBOARD -r disk:sunray=/home/yz16184The following table describes the parameters.
Parameter Description -u The username to use to log on to the Windows instance. The default username is Administrator. -p The password to use to log on to the Windows instance. -f The full-screen mode. You can press Ctrl+Alt+Enter to switch the mode. -g The screen resolution. An asterisk (*) is used between the pixel width and height. This parameter can be left empty. If this parameter is not specified, the full-screen mode is used. 192.168.1.1 The IP address of the instance. Replace it with the public IP address or EIP of your Windows instance. -d The domain name. For example, if the domain name is INC, set the parameter to
-r Multimedia redirection. Examples:
- Turn on the sound:
- Use a local sound card:
-r sound : local.
- Enable USB flash drive:
-r clipboard:PRIMARYCLIPBOARD Allows text including Chinese to be copied between the local client that runs a Linux operating system and the Windows instance. -r disk:sunray=/home/yz16184 Maps a directory in the Linux operating system on the local client to a disk in the Windows instance. This way, Samba and FTP are not required for transferring files.
- Turn on the sound:
Connect from a local client that runs a macOS operating system
For information about how to connect to a Windows instance from a local client that runs a macOS operating system, visit Get started with the macOS client.