Thank you for your help, samir.
I've done the following and can't get a login.
Started fresh Ubuntu 10.10 64bit. Enabled SSH in the initial setup screens.
apt-get install autoconf
apt-get install libtool
apt-get install libcurl4-openssl-dev
$ wget
http://yubico-c-client.googlecode.com/f ... 2.3.tar.gz$ tar -zxvf ykclient-2.3.tar.gz
$ autoreconf --install
$ ./configure
$ sudo make check install
$ wget
http://yubico-pam.googlecode.com/files/ ... 2.5.tar.gz$ tar -zxvf pam_yubico-2.5.tar.gz
$ autoreconf --install
$ ./confgure
$ sudo apt-get install libpam-dev
$ ./configure
$ sudo make check install
$ sudo cp /usr/local/lib/security/pam_yubico.so /lib/security/
$ sudo nano /etc/pam.d/common-auth
Edit line 17
Change
auth [success=1 default=ignore] pam_unix.so nullok_secure
to
auth [success=1 default=ignore] pam_unix.so try_first_pass nullok_secure debug
Save, exit.
$ sudo nano /etc/pam.d/sshd
add
auth required pam_yubico.so id=1234 key=xyz authfile=/etc/yubikeyid debug
to the beginning of the file
save, exit
$ sudo nano /etc/ssh/sshd_config
Copypasted the sshd_config from the post above.
$ sudo /etc/yubikeyid
add exiva:vvfgjxxxxxxx
save,exit
$ sudo /etc/init.d/ssh restart
$ touch /var/run/pam-debug.log
$ chmod go+w /var/run/pam-debug.log
$ tail -f /var/run/pam-debug.log
Results in:
[Travis-MacBook-Pro:~] travis% ssh exiva@192.168.1.110
exiva@192.168.1.110's password: testingpassword
Permission denied, please try again.
With
Code:
[pam_yubico.c:parse_cfg(404)] called.
[pam_yubico.c:parse_cfg(405)] flags 1 argc 4
[pam_yubico.c:parse_cfg(407)] argv[0]=id=1234
[pam_yubico.c:parse_cfg(407)] argv[1]=key=xyz
[pam_yubico.c:parse_cfg(407)] argv[2]=authfile=/etc/yubikeyid
[pam_yubico.c:parse_cfg(407)] argv[3]=debug
[pam_yubico.c:parse_cfg(408)] id=1234
[pam_yubico.c:parse_cfg(409)] key=xyz
[pam_yubico.c:parse_cfg(410)] debug=1
[pam_yubico.c:parse_cfg(411)] alwaysok=0
[pam_yubico.c:parse_cfg(412)] verbose_otp=0
[pam_yubico.c:parse_cfg(413)] try_first_pass=0
[pam_yubico.c:parse_cfg(414)] use_first_pass=0
[pam_yubico.c:parse_cfg(415)] authfile=/etc/yubikeyid
[pam_yubico.c:parse_cfg(416)] ldapserver=(null)
[pam_yubico.c:parse_cfg(417)] ldap_uri=(null)
[pam_yubico.c:parse_cfg(418)] ldapdn=(null)
[pam_yubico.c:parse_cfg(419)] user_attr=(null)
[pam_yubico.c:parse_cfg(420)] yubi_attr=(null)
[pam_yubico.c:pam_sm_authenticate(452)] get user returned: exiva
[pam_yubico.c:pam_sm_authenticate(542)] conv returned: testingpassword
[pam_yubico.c:pam_sm_authenticate(550)] OTP too short: testingpassword
[pam_yubico.c:pam_sm_authenticate(625)] done. [Authentication failure]
in the pam-debug file.
It seems to be passing my linux password over to the yubico module. (Of course I don't have my ID, key, and yubico ID set to random values.)