Troubleshoot SSH errors
Copy the instance’s public IPv4 address, SSH port and username from the console. Don’t use another machine’s address or assume the port is the default. Run the commands below in your local terminal and enter the connection details shown in the console.
read -r -p "Host: " SSH_HOST
read -r -p "Port: " SSH_PORT
read -r -p "User: " SSH_USER
ssh -vv -o ConnectTimeout=10 -p "$SSH_PORT" "$SSH_USER@$SSH_HOST"
| Terminal output | Check first | Include in your support request |
|---|---|---|
| Connection timed out | Check that the instance is running and the address and port are correct. Test from another local network to rule out restrictions on your current network. | When the connection was attempted, network used and last log lines before the timeout. |
| Connection refused | Make sure you’re using the right port. If you recently changed the SSH configuration, describe what you changed; don’t keep changing firewall settings. | Port, last successful connection time and recent system configuration changes. |
| Permission denied | Check the username, which key the client is actually using, and whether the public key is in the correct user’s authorized_keys file. | Authentication method and redacted authentication logs. Never send your private key. |
| Host key changed | First confirm whether the instance was reinstalled or replaced, then verify the host fingerprint. Don’t disable host key checking. | Whether you requested a reinstall, current instance ID and warning message. |