Warning: unprotected key file

The login fails with a message like the following:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
jdoe1@glogin10.hpc.gwdg.de: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,hostbased).

This indicates that the file permissions of your private key file are too open. It has nothing to do with the passphrase set for the SSH key. The solution is to make the private key only readable to your own user with: chmod 600 <path/to/your-key>

You can verify the result by either directly trying to log in again, or use ls -l <path/to/your-key>:

jdoe1@laptop:~> ls -l ~/.ssh/id_rsa
-rw------- 1 jdoe1 jdoe1 1766 Jun 13  2031 /home/jdoe1/.ssh/id_rsa

The Unix file permissions -rw------- show that the file is only readable and writable for its owner, the user jdoe1.

Windows Subsystem for Linux (WSL)

If you tried changing the file permissions and you still cannot connect, please veryfy with ls -l <path/to/your-key> that your file permissions are correct. If you use WSL and you are working with Windows data (i.e. your working directory is somewhere in the Windows file system, not the WSL file system), it may not be possible to change the permission.

In that case, please copy the key to the WSL file system with:

mkdir -p ~/.ssh/
cp <path/to/your-key> ~/.ssh/
chmod 600 ~/.ssh/<your-key>
ls -l ~/.ssh/<your-key>

The last command is to verify the permissions of the key.