Đang Tải...

Trang chủ
Tot Blog

Tutorials

Unable to remote (RDP, SSH) to the server: How to check and troubleshoot

10/04/2024

icon

When using a virtual server, you may encounter errors preventing remote access to the server via RDP or SSH. Let's explore how to diagnose and address this issue in the following article.

Mục lục

Mục lục

During the use of a virtual server, you may encounter errors preventing connection or remote access to the server via tools like RDP or SSH. To address this, first, we need to identify the root cause of the issue. In the following article, TotHost will share how to diagnose and handle it accordingly.

Let's check the following points step by step:

1. Check the power

If the server is not powered on, you won't be able to remote access it. Therefore, first, we need to check if the server is turned on. VPS providers usually provide information about the server's status. For more certainty, use VNC (Virtual Network Computing) to check if the server is on or off.

2. Check the network

If there is no network connection, you won't be able to establish a connection. Check both ends of the connection, including:

  • Your network: ping 8.8.8.8 / <server IP> to check if your network can connect to the internet / route to the server(*) or not.
    (*
    ): For private cloud systems, specific channels may be set up to access the server, such as VPN. Therefore, you can use the tracert (Windows) / traceroute (Linux) command to know the network's route.
  • Server network: ping to 8.8.8.8 to check if the server can connect to the internet. For VPS lessees, you can simply check if both ends of the connection can access the internet. If there is an issue with the server not connecting to the internet, report it to the provider to check the network. For administrators, check the server's VLAN to ensure correctness and make changes to the connection if necessary.
  • Ping unsuccessful: Replies will display messages such as 'Request time out', 'destination host unreachable',...
  • Successful ping will display as follows:

kiểm tra mạng: ping thông

3. Firewall could also be the reason for being unable to remote to the server

If electricity or network isn't the issue, you might still be connected but the port is blocked by the Firewall. To check if it's blocked, use the telnet command from the client to the server.

kiểm tra firewall: port kết nối bị chặn

If it displays anything, it means the connection port is either blocked or not operational.

kiểm tra firewall: Kết nối thành công

A successful connection will either show a screen or nothing.

4. Check the Services:

For Windows: Check if the RDP service is running: Press Windows key + S, type "Services," and press Enter to check if RDP is running. If it's not, right-click and select "running."

Kiểm tra service RDP trên window

For Linux: Check if sshd is running using the command systemctl status sshd, or by using similar commands to check the status because not all Linux systems use systemctl. If it's in a stopped state, turn it on.

Kiểm tra sshd trên Linux

Check if the port is in the Listen state:

Kiểm tra port đã sang trạng thái Listen

  • Windows: Use netstat-an | findstr <connection port*>
  • Linux: Use netstat-an | grep <connection port*> (*): Not all servers use default ports for connection (Linux: 22, Windows: 3389). Therefore, you should check the server's connection port configuration. If you're using a VPS, connection information will be sent via email. Additionally, you can check as follows:
  • Linux: Check the file /etc/ssh/sshd_config to verify the connection port.
  • Windows: Windows + S ⇒ "regedit" ⇒ Enter ⇒ HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp ⇒ Navigate to PortNumber to find connection information.

If you've checked all the points above and still can't remote into the server, please contact the Admin (IT Support) for assistance.

 

TAG: IP

TelegramCommunity
scroll top
Thông báo
Đóng