Remote Login Failure Due To Port Issues

Last updated: 2019-12-13 18:20:20

PDF

This document introduces how to troubleshoot the issue of inability to remotely log in to a CVM due to port problems.

The following operations take a CVM with the Windows Server 2012 system as an example.

Diagnostic Tool

You can use the following tool to check whether the inability to log in is related to port or security group configuration:

If it is detected to be a security group configuration problem, you can use the Open All Ports in the Port Verification to open the related ports to the Internet and then try to log in again. If you still cannot log in after opening the ports to the Internet, please refer to the following content to troubleshoot the issue.

Troubleshooting Approaches

Checking Network Connectivity

You can use the local Ping command to test the network connectivity. At the same time, you can test on computers in different environments (different IP ranges or different carriers), to check whether it is a local network problem or a server problem.

  1. Open the command line tool on your local computer.
    • Windows systems: Click Start > Run, enter cmd, and the command line dialog box will pop up.
    • Mac OS systems: Open the Terminal tool.
  2. Execute the following command to test the network connection.
    ping + CVM Instance public IP address
    For example, execute the ping 193.112.XXX.XXX command.
  3. Execute the following command and press Enter to check whether the remote port is open and accessible.
    telnet + CVM instance public IP address + Port number
    For example, execute the telnet 139.199.XXX.XXX 3389 command. This is shown in the following figure:
    • Normal: Black screen, only the cursor appears. This indicates that the port (3389) can be accessed. Please check whether the instance remote desktop service is enabled.
    • Exceptional: The connection fails, as shown in the following figure. This indicates that there is a network problem. See the corresponding part of the network.

Checking Remote Desktop Service Configuration

Logging in to the CVM using the VNC

The VNC method is the recommended login method when you are unable to log in to the CVM using the standard method.

  1. Log in to the CVM Console.
  2. Select the CVM to check and click Log in. This is shown in the following figure:
  3. In the Log into Windows Instance window that pops up, select Other login methods (VNC), and click Log in to log in to the CVM.
  4. In the login window that pops up, select Send Remote Command in the top left corner, and click Ctrl-Alt-Delete to enter the system login interface as shown below:

Checking whether the remote desktop configuration of the CVM Is Enabled

  1. In the CVM, right click This Computer > Properties to open the System window.
  2. In the System window, select Advanced System Configurations to open the System Properties window.
  3. In the System Properties window, select the Remote tab page. Check whether Allow remote connections to this computer in the Remote Desktop function column is checked off. This is shown in the following figure.
    • If it is, this indicates that the remote connection configuration is enabled. Please check whether remote access ports are enabled.
    • If it is not, check Allow remote connections to this computer, and try to remotely connect to the instance again to check whether the connection is successful.

Checking Whether Remote Access Ports Are Open

  1. In the CVM, click to open the Windows PowerShell window.
  2. Execute the following command to check the remote desktop running status (in default status, the remote desktop service port is 3389).
    netstat -ant | findstr 3389

Checking Whether the Remote Ports in the Registry are Consistence

This step guides you to check whether the TCP PortNumber and RDP Tcp PortNumer are the same.

  1. In the CVM, click , select , and enter regedit. Press Enter to open the Registry Editor window.
  2. In the registry navigation on the left, expand the following directories in order: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Terminal Server > Wds > rdpwd > Tds > tcp.
  3. In tcp locate PortNumber and note down the port number (3389 by default) as shown below:
  4. In the registry navigation on the left, expand the following directories in order: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Terminal Server > WinStations > RDP-Tcp.
  5. In RDP-Tcp locate PortNumber and check whether the PortNumber data in RDP-Tcp is the same as the one in tcp. This is shown in the following figure:
  6. Double click PortNumber in RDP-Tcp.
  7. In the dialog box that pops up, modify Value data to a port number between 0 - 65535 that are not occupied, making the TCP PortNumber and RDP Tcp PortNumer port numbers maintain consistency, and click OK.
  8. After modification, restart the instance in the CVM Console, and try connect remotely to the instance again and check whether the connection is successful.

Restarting the Remote Log in Service

  1. In the CVM, click , select , and enter services.msc. Press Enter to open the Services window.
  2. Locate and right-click Remote Desktop Services. Select Restart to restart the remote log in service. This is shown in the following figure:

Other Operations

If you are still unable to remotely log in after executing the preceding operations, please submit a ticket.