Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:services:application_services:high_performance_computing:connect_with_ssh:common_problems [2020/12/03 08:10] – [Warning: unprotected key file!] mbodenen:services:application_services:high_performance_computing:connect_with_ssh:common_problems [2021/12/06 11:41] (current) – [Windows] mboden
Line 1: Line 1:
 +====== 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:
 +<code>
 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +@         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).
 +</code>
 +
 +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 <path/to/your-key>''
 +
 +You can verify it by either trying to log in again, or use ''ls -l <path/to/your-key>'':
 +<code>
 +ls -l ~/.ssh/id_rsa
 +-rw------- 1 marcus marcus 1766 Jun 13  2018 /home/marcus/.ssh/id_rsa
 +</code>
 +
 +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 <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-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:
 +<code>
 +mkdir -p ~/.ssh/
 +cp <path/to/your-key> ~/.ssh/
 +chmod 600 ~/.ssh/<your-key>
 +ls -l ~/.ssh/<your-key>
 +</code>
 +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]].