Skip to main content

Connecting to a Windows VM via RDP

You can connect to a Hyperstack virtual machine running Windows using the Remote Desktop Protocol (RDP). RDP provides a graphical interface for remote connections, making it ideal for Windows environments where users require access to a GUI. Secure Shell (SSH), on the other hand, offers command-line access and is commonly used for Unix-based systems. This article provides instructions on how to connect to a Windows VM via RDP from a Windows, Mac, or Linux machine.

Prerequisites for RDP connection:

  • Verify your VM is running: On the 'My Virtual Machines' page in Hyperstack, ensure the VM is displaying an ACTIVE status. It may take some time for all services to initialize after the VM is deployed. If there is a connection error, retry after a few minutes. If you have not yet created a virtual machine, follow our getting started guide for instructions.

  • Ensure your VM has a public IP address: To check if your VM has a public IP address, go to the 'Virtual Machines' section in Hyperstack to open the 'My Virtual Machines' page.

    • If an IP address is listed under the Public IP header, then your VM has a public IP.
    • If no IP address is listed, navigate to the Networking tab on the VM's details page and toggle Public IP Attached to assign one.

1. Setup your Windows VM to enable network connectivity

  1. In Hyperstack, navigate to the 'My Virtual Machines' page to access your VMs. Click on the name of the VM you wish to establish an RDP connection with to view its details.

  2. In the top right corner, click the Access Console button to open the VNC console for the VM.

    VNC 1

  3. In the VNC console, complete the basic setup wizard for the Windows VM:
    a. Set a password for your administrator account.
    b. Send CTRL + ALT + Delete.
    c. Sign into your Administrator account using your password.

  4. Once you sign in, you will see the message popup shown below. Click Yes to enable network connectivity for the VM.

    VNC 2

  5. In Server Manager, click Local Server and verify that Remote Desktop is enabled.

2. Enable TCP connectivity

Learn how to create a direct firewall rule to enable RDP connectivity on port 3389 by following the instructions below:

  1. In Hyperstack, go to the 'My Virtual Machines' page to access your VMs. Click on the name of the VM you wish to establish an RDP connection with to view its details.

  2. Navigate to the Firewall tab on the VM's details page. Under the Direct Firewall Rules section, click + Add Inbound Rule in the Inbound Rules section.

  3. Select the TCP protocol and specify port range 3389 (the default RDP port). Additionally, enter the IP address of the computer you are using to connect to the VM via RDP in the Remote IP Prefix field to restrict access to your IP only. When completed, click the Add button to create the firewall rule.

RDP Firewall

3. Verify TCP connectivity

Open a command prompt and use telnet to check if the VM's port 3389 is open:

telnet [VM_Public_IP_Address] 3389
  • Replace [VM_Public_IP_Address] with the public IP address of the virtual machine you are trying to connect to.

If the port is open, you will see the following connection message. Proceed to step 4. Connect to the VM via RDP

Successful connection
Trying 149.36.0.98...
Connected to 149.36.0.98.

If you are unable to connect, this means that the port is closed. Review your firewall settings to ensure the port is open by reviewing the steps outlined above.

Failed connection
Trying 149.36.0.88...
telnet: connect to address 149.36.0.88: Connection refused
telnet: Unable to connect to remote host

4. Connect to your VM via RDP

  1. Click Start.
  2. In the search box, type Remote Desktop Connection and select the appropriate item.
  3. In the Remote Desktop Connection window, enter the public IP address of the VM in the Computer field.
  4. Click Connect.
  5. Specify the account settings:
    • User name: Administrator
    • Password: (Enter your password)
  6. Click OK.
info

If you encounter the issues "Access is Denied" or "User is not authorized" when attempting to connect via RDP, follow the troubleshooting steps outlined below.

Troubleshooting user access issues

Make sure that the user account belongs to a group that has the right to sign in remotely to the remote computer. Use the following procedures, depending on how you manage user access rights on the remote computer. Remember that Group Policy settings override Local Security Policy settings.

If you use Group Policy at the domain level, follow these steps:

  1. On the Server Manager Tools menu, open the Group Policy Management Console (GPMC), right-click the Group Policy Object (GPO) that controls the remote computer, and then select Edit to open the Group Policy Editor.
  2. Select Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > User Rights Assignment.
  3. Select Allow logon through Remote Desktop Services. If the policy is enabled, right-click Allow logon through Remote Desktop Services, and then select Properties. If the policy isn't defined, see the next procedure to check the local security policy.
  4. Check the groups that have been assigned this right. If the user doesn't belong to a group that has this right, either add the group to the policy or add the user to one of the groups that is already configured.

If you use local security policy, follow these steps:

  1. On the remote computer, open Local Security Policy.
  2. Select Security Settings > Local Policies > User Rights Assignment.
  3. Select Allow logon through Remote Desktop Services, and check the list of groups in Security Settings. If the user doesn't belong to a group that has this right, either add the group to the policy or add the user to one of the groups that is already configured.
  4. To add a group to the policy, right-click the policy, and then select Properties. Select Add User or Group, and then select a group.

For solutions to other user access issues, refer to the official Microsoft documentation.

note

It may take a few minutes to initialize RDP, and in rare cases, the process may take significantly longer than expected.


Back to top