I use
and it works on the surface. But /var/log/auth.log logs the following:
The permissions on ~/.ssh/authorized_keys are set properly:
And despite the logged refusal, the authentication succeeds. What could be the problem here?
pam_ssh_agent_auth to authenticate as root on my host
Code:
# /usr/local/etc/pam.d/sudo
auth sufficient pam_ssh_agent_auth.so file=~/.ssh/authorized_keys
auth include system
and it works on the surface. But /var/log/auth.log logs the following:
Code:
Dec 3 04:08:54 bsd sudo[79278]: pam_ssh_agent_auth: Authentication refused: bad ownership or modes for file /home/jan/.ssh/authorized_keys
Dec 3 04:08:54 bsd sudo[79278]: pam_ssh_agent_auth: Found matching ED25519 key: <redacted>
Dec 3 04:08:54 bsd sudo[79278]: pam_ssh_agent_auth: Authenticated (agent): `jan' as `jan' using /home/jan/.ssh/authorized_keys
The permissions on ~/.ssh/authorized_keys are set properly:
Code:
jan@bsd:~/.ssh $ ll
total 12
drwx------ 2 jan jan - 512 Dec 2 09:22 ./
drwxr-xr-x 3 jan jan - 512 Dec 2 20:51 ../
-rw------- 1 jan jan - 103 Dec 2 09:22 authorized_keys
And despite the logged refusal, the authentication succeeds. What could be the problem here?