User Tools

Site Tools


ssh-key-login-not-working

Differences

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

Link to this comparison view

ssh-key-login-not-working [2021/09/20 17:33] – created baumissh-key-login-not-working [2022/05/02 09:23] (current) baumi
Line 1: Line 1:
 ====== Things to check, if SSH key login is not working ====== ====== Things to check, if SSH key login is not working ======
 +===== Permission issues =====
  
   - authorized_keys contains correct public key   - authorized_keys contains correct public key
   - authorized_keys file has permisions 600   - authorized_keys file has permisions 600
   - .ssh directory has permissions 755 or more restrictive   - .ssh directory has permissions 755 or more restrictive
 +
 +===== Key Exchange Issues =====
 +
 +  - Newer versions of openssh do no longer accept ssh-rsa as public key algorithm
 +  - To diagnose add "Loglevel DEBUG3" to /etc/ssh/sshd_config and restart sshd
 +  - /var/log/auth.log should then contain the following line <code>
 +userauth_pubkey: signature algorithm ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]
 +</code>
 +  - Workaround: add "PubkeyAcceptedKeyTypes=+ssh-rsa" to /etc/ssh/sshd_config and restart sshd
 +  - Fix: Regenerate your public/private keypair
  
 {{tag>kb ssh}} {{tag>kb ssh}}
  
ssh-key-login-not-working.1632152038.txt.gz · Last modified: by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki