I have set up SSH keys, but logging in to Puhti does not work or still asks for password
Puhti is used as an example here. Same steps apply for Mahti as well.
Please check the following
- You have
added your SSH public key to MyCSC
and it is visible under SSH PUBLIC KEYS on your Profile page. Other ways
to upload your key are not supported.
- Ensure that the key you upload is formatted correctly. It should consist of the SSH key type, the key sequence and an optional comment, all separated by single spaces. Make sure to add the whole SSH key on the same line and do not add other whitespace than normal space characters. If your key is improperly formatted, an error message is displayed. A key in the correct format looks like this:
- The key fingerprint in MyCSC (starting with SHA256) matches the key you
have on your local machine. On Windows, the fingerprint of a loaded key
is shown in the Key section of MobaKeyGen or PuTTYgen. To check the
fingerprint on Linux or macOS, run the command:
If the fingerprint does not match the one in MyCSC, you have not added the
correct key. Output
<key file> is not a public key file
means that the key you have is faulty. In both cases, it is easiest to create a new key pair and add the new public key to MyCSC. - If you have stored your SSH key file with a non-default name or in a
non-default location, you must tell the
ssh
command where to look for the key. When connecting from the terminal, use option-i
as follows: - If
ssh
command still asks for a password, double check whether it is actually asking for the password for Puhti, or the key passphrase. If you have defined a passphrase for your key (strongly recommended), it is normal that you will need to enter it when connecting. To avoid having to type the passphrase, you may configure an authentication agent that can hold your keys in memory. - You have waited for at least one hour after adding the key to MyCSC. Syncing the data to CSC servers takes some time and may depend on the current load on the systems. To check if your public key has been synced, you may login to Puhti web interface, open a login node shell and run: For SSH login to work, the above file must exist and contain the key you are trying to use.
- On Linux and macOS, ensure that your
~/.ssh
folder and private key file have 0700 and 0600 permissions, respectively. Example of correct permissions: To set correct permissions:
If everything above checks, and you are still unable to login to Puhti, please contact CSC Service Desk.