Red Hat Bugzilla – Bug 704930
AuthorizedKeysFile not working
Last modified: 2011-05-16 22:33:08 EDT
Description of problem:
authorizedkeysfile parameter in /etc/ssh/sshd_config does not work. So ssh autologin can not work with public ssh key.
Version-Release number of selected component (if applicable):
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bergwolf/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bergwolf/.ssh/id_rsa.
Your public key has been saved in /home/bergwolf/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| + |
| . o * |
| o o o + |
| B . o |
| S * . |
| . o + E |
| . o oo . |
| . ...o |
| .o .o |
[Fedora29@.ssh]$cat id_rsa.pub >> authorized_keys
[Fedora29@.ssh]$sudo cat /etc/ssh/sshd_config |grep authorized_keys
ssh still requires password
ssh should login without promoting for passwd
1) repair all permissions of the authorized keys file including selinux lebel (restorecon).
2) check logs security and audit.
3) if step 1 works for you close this bugzilla
4) if does not please attach here your sshd_config and interesting pieces of the logs
Also what is your output of
# ls -lZ /home/bergwolf/.ssh
It turns out to be
May 16 17:57:31 Fedora15 sshd: Authentication refused: bad ownership or modes for directory /home/bergwolf/.ssh
After doing chmod 700 .ssh, it works now.
Thanks a lot, Jan and Miroslav.