Dev.to Security ๐Ÿ” Cybersecurity ๐Ÿ‘ 0 ๐Ÿ“– 1 min read

Diagnosing a Tencent Cloud CVM SSH Timeout Without Opening Port 22 to Everyone

An SSH timeout on a Tencent Cloud CVM instance usually means the TCP connection never reached the SSH service. Start by distinguishing a timeout from an authentication error so you can narrow the investigation.

An SSH timeout on a Tencent Cloud CVM instance usually means the TCP connection never reached the SSH service. Start by distinguishing a timeout from an authentication error so you can narrow the investigation.

Verify the endpoint and source address

Check that the instance is running, then confirm the public IP or EIP is attached to the intended instance. From the client, run ssh -vv -o ConnectTimeout=8 user@HOST. If you are connecting through a VPN or bastion, use the source IP that the CVM security group will actually see.

Check the network path from outside in

Confirm the inbound rule permits TCP 22 from an approved IP or CIDR and is attached to the correct instance. If your VPC uses network ACLs or custom routing, check that the return path is allowed. Avoid temporarily allowing 0.0.0.0/0 just to test connectivity.

Inspect the service from the console

If the path looks correct, use the provider console to check ss -lntp, the host firewall, and the SSH service logs. Linux distributions may name the service ssh or sshd. Validate a configuration change with sshd -t before reloading the service, and keep your console session available while testing a new SSH connection.

Further reading: Tencent Cloud CVM operations notes ยท Telegram contact

๐Ÿ“ฐ Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.