Help & DocumentationCloud Virtual MachineTroubleshooting IssuesInstance Related FailuresAbout Linux InstancesUnable to Log into a Linux Instance via SSH
This document shows you how to troubleshoot the problem where a Linux instance cannot be logged in to via SSH. A CVM running on the CentOS 7.5 operating system is used as an example.
Fault Symptom
When you use SSH to log in to a Linux instance, a message appears indicating that the connection is unavailable or failed.
Fault Locating and Troubleshooting
- Log in to the Cloud Virtual Machine Console.
- On the instance management page, select the instance to be troubleshot and choose More* > **Security Group > Configure Security Group, as shown below:
- In the Configure Security Group window that appears, click the configured (selected) security group ID.
The page of the security group bound to this instance appears. - On the inbound rule tab page of the security group rule, click Open All.
- In the pop-up window, click OK.
- Log in to the Linux instance via SSH again. Check whether the login succeeded.
- Yes. The problem has been solved.
- No. Go to Step 7.
- Log in to the Linux instance via virtual network computing (VNC).
- On the operating system UI, run the following command to check whether a port is listened on by the SSH daemon (SSHD) service:
netstat -tnlp | grep sshd
- Run the following command to check whether the SSHD service has started.
systemctl status sshd.service
- If the SSHD service has started, send feedback by Submitting a Ticket.
- If the SSHD service has not started, run the following command to start the SSDH service and log in to the Linux instance again via SSH.
systemctl start sshd
If you still cannot connect to your instance after performing the preceding steps, we recommend that you send feedback by Submitting a Ticket.