Common SSH Issues and Solutions

Fixes for the most common errors when connecting to GPUnet Cloud GPUs over SSH.

Intro

These are some common issues users run into when connecting to GPUnet Cloud GPUs via SSH, and the solutions to fix them. Happy computing!

Unprotected Key File

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'my-key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "my-key.pem": bad permissions
<username>@<ip>: Permission denied (publickey).

Your private key file (.pem) does not have the correct permissions. On Unix-based systems (Linux or macOS), run the following to fix them:

chmod 600 <path_to_key_file>

Remote Host Identification Has Changed

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Please contact your system administrator.
Add correct host key in /Users/xxxxx/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xxxxx/.ssh/known_hosts:1569
Host key for <ip> has changed and you have requested strict checking.
Host key verification failed.

The server behind this IP address has changed since the last time you connected to it. On GPUnet Cloud, many providers assign public IPs from a shared pool. If you previously launched an instance and have just launched a new one, the IP address has most likely been reused for a different machine.

Remove the old entry from your known hosts to resolve it:

ssh-keygen -R <ip>

Permission Denied

<username>@<ip>: Permission denied (publickey)

If you are sure you're using the correct private key and still get permission denied, SSH may be trying other keys from your keychain first. The server rejects your connection after several failed attempts in a row. Point SSH at your private key file and tell it to use only that key:

ssh -i <path_to_private_key> -o IdentitiesOnly=yes <username>@<ip>

Last updated on

On this page