SSH connection refused
Fix an SSH connection that times out, is refused or denied: the IP rule of a Secure machine, the key, the user, and a changed host key.
Find your error below. The session page shows the exact SSH command once the session is running: start from it.
Connection timed out on a Secure machine
A Secure machine accepts SSH on port 22 from one address: the public IPv4 address, or range up to a /24, entered at launch.
- Check your public address:
curl -4 https://ifconfig.me. - Compare it with the address on the session page.
- Different? A VPN, a mobile hotspot or another network changed it. Connect from the address you entered, or end the session and launch a new one from your current address.
The address cannot change on a running session. Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are refused at launch: enter the public address.
Permission denied (publickey)
The key your computer offers is not the key the machine holds.
- Connect as
ubuntu, notroot. - Pass the private key explicitly:
ssh -i ~/.ssh/id_ed25519 ubuntu@<address>. - Check that the public key pasted at launch is the
.pubfile of that private key. See SSH keys.
A running Secure session keeps the key it started with. To use another key, launch a new session.
Connection refused right after launch
SSH is still starting inside the machine. Wait 30 seconds, then retry.
REMOTE HOST IDENTIFICATION HAS CHANGED
A new machine reused an address you connected to before. Remove the old entry, then connect again:
ssh-keygen -R <address>
Community sessions
A Community session needs no IP rule: connections reach your VM through Node Lodge. Use the command on the session page, or open JupyterLab from it. For Permission denied (publickey), check the key as above.
Still refused
Write to support@nodelodge.com with the session ID, the command you ran and the full error. Run ssh -v to get the details.