Unsafe AuthorizedKeysCommand "/usr/bin/sss_ssh_authorizedkeys": bad ownership or modes for directory /
Issue
- SSH server denies login using ssh public key
-
ssh key is stored in remote IdM/AD server, and retrieved by command specified in
AuthorizedKeysCommand
option insshd_config
:AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys AuthorizedKeysCommandUser nobody
-
Below error message is recorded in
/var/log/secure
:sshd[40269]: error: Unsafe AuthorizedKeysCommand "/usr/bin/sss_ssh_authorizedkeys": bad ownership or modes for directory /
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- OpenSSH
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.