A guide for diagnosing and resolving SSH connection problems when accessing Vultr Compute Instances.
SSH is the primary method for managing Vultr Compute Instances. However, misconfigurations, service errors, or encryption mismatches can make the SSH protocol handshake fail. This guide explains how to troubleshoot such SSH protocol-level issues.
Before troubleshooting SSH directly, complete the following checks:
Log in to the Vultr Customer Portal and ensure.
22
(default SSH port).If your SSH access is broken, use the Vultr View Console option from the portal to access the instance directly, even if networking is down.
Use the Server Restart option from the instance's Overview tab in the Vultr Customer Portal. Rebooting the server can often resolve basic SSH or networking issues caused by temporary misconfigurations or service failures.
Host Key Verification Failed
Error Message (OpenSSH):
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Cause:
Fix (OpenSSH):
$ ssh-keygen -R `<SERVER-IP>`
Connection Closed or Reset by Peer.
Error Message:
Connection closed by 192.0.2.123 port 22
Causes:
Fix:
Access web console and run the below commands:
$ sudo systemctl status sshd
$ sudo ssh-keygen -A # Regenerate host keys if missing
$ sudo systemctl restart sshd
Cipher Mismatch or Key Exchange.
Error Message:
Unable to negotiate with 192.0.2.123: no matching key exchange method found.
Cause:
Server supports only legacy ciphers (e.g., diffie-hellman-group1-sha1)
Fix (OpenSSH):
$ ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 <username>@<SERVER-IP>