====== Common SSH Problems ======
This page addresses some regularly occurring problems and questions regarding connecting via SSH.
===== Warning: unprotected key file! =====
If you get a message like this:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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.
mboden@login-fas.hpc.gwdg.de: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,hostbased).
This indicates that the file permissions og your private key file are too open. It has nothing to do with the password set on the SSH-key itself. The solution is to make the key only readable to your own user with:
''chmod 600 ''
You can verify it by either trying to log in again, or use ''ls -l '':
ls -l ~/.ssh/id_rsa
-rw------- 1 marcus marcus 1766 Jun 13 2018 /home/marcus/.ssh/id_rsa
The ''-rw-------'' shows that the file is only read- and writable for my users. If you are not familiar with file permissions, you can find information on that in our [[en:services:application_services:high_performance_computing:courses:scc-introductory-course|Introductory course]] or [[https://ryanstutorials.net/linuxtutorial/permissions.php|online]].
==== Windows ====
If you tried changing the file permissions and you still cannot connect, please veryfy with ''ls -l '' 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-Filesystem, 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 ~/.ssh/
chmod 600 ~/.ssh/
ls -l ~/.ssh/
The last command is to verify the permissions of the key. If all that still doesn't work, feel free to [[hpc-support@gwdg.de|reach out to us]].