I can't get Yubikey to work with SSH on RHEL 7 / CentOS 7. I always get the error
Code:
debug1: PAM: initializing for "root"
PAM unable to resolve symbol: pam_sm_authenticate
PAM unable to resolve symbol: pam_sm_setcred
debug1: PAM: setting PAM_RHOST to "192.168.122.1"
debug1: PAM: setting PAM_TTY to "ssh"
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 1 failures 0 [preauth]
password check failed for user (root)
pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.122.1 user$
pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
debug1: PAM: password authentication failed for root: Module is unknown
This is what I did to install Yubikey on RHEL 7 / CentOS 7:
Code:
rpm -Uvh http://download.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
yum -y install libyubikey
In /etc/pam.d/sshd:
Code:
#%PAM-1.0
auth required /usr/lib64/libyubikey.so id=16 authfile=/etc/yubikey_mappings
...the rest of the file
In /etc/yubikey_mappings:
Code:
root:cccc....
Code:
systemctl restart sshd.service
But no luck. On RHEL 6 and CentOS 6, everything is working fine.