<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=5&amp;t=627" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2011-02-15T23:39:37+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5&amp;t=627</id>
<entry>
<author><name><![CDATA[cornelinux]]></name></author>
<updated>2011-02-15T23:39:37+01:00</updated>
<published>2011-02-15T23:39:37+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=627&amp;p=2572#p2572</id>
<link href="https://forum.yubico.com/viewtopic.php?t=627&amp;p=2572#p2572"/>
<title type="html"><![CDATA[Re: SSH authentication with 3 step (login/passwd/otp)]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=627&amp;p=2572#p2572"><![CDATA[
Hi meepmeep,<br /><br />yes it is possible. I guess it would be possible in several differen ways. Well - I do not know the pam_yubico.so but you could do some pam stacking that first would do <br /><br />  pam_unix<br /><br />to authenticate with the password and then do<br /><br />  pam_radius or pam_yubico<br /><br />to authenticate with the OTP. <br />You can use the yubikey with many different backends. When you inititilize it with HOTP, there are even more backends aroud, which will work e.g. with pam_radius...<br /><br />(Just a very top level answer...)<br /><br />Kind regards<br />Cornelius<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1455">cornelinux</a> — Tue Feb 15, 2011 11:39 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[meepmeep]]></name></author>
<updated>2011-01-26T12:17:08+01:00</updated>
<published>2011-01-26T12:17:08+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=627&amp;p=2530#p2530</id>
<link href="https://forum.yubico.com/viewtopic.php?t=627&amp;p=2530#p2530"/>
<title type="html"><![CDATA[SSH authentication with 3 step (login/passwd/otp)]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=627&amp;p=2530#p2530"><![CDATA[
Hi<br /><br />I just get my yubikey, and I would like to know if it's possible to have a 3 step identification :<br />- login (not always a dependant step, because the ssh client could tacitly send the username) <br />- Password <br />- OTP<br /><br />Currently, my yubikey<strong> is working</strong> great with yubico-pam on a debian stable, but, the OTP has to be concatenate with the password (I enter my username, press enter, enter my password, press the yubikey).<br /><br />I'm using :<br />- Debian stable (5.0.8)<br />- OpenSSH_5.5p1 Debian-6, OpenSSL 0.9.8o 01 Jun 2010<br />- Ykclient 2.3<br />- pam-yubiko 2.5<br />- in /etc/pam.d/sshd :<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth required pam_yubico.so id=&lt;myID&gt; key=&lt;myKey&gt; debug authfile=/etc/yubikey_mappings<br /></div>- In /etc/yubikey_mappings :<br />&lt;myusername&gt;:&lt;Token ID&gt;<br />- In /etc/pam.d/common-auth :<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth    &#91;success=1 default=ignore&#93;      pam_unix.so nullok_secure debug try_first_pass</div><br />- In /etc/ssh/sshd_config :<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">PasswordAuthentication yes<br />ChallengeResponseAuthentication no</div><br />I try to set <br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">ChallengeResponseAuthentication yes</div><br /><br />The ssh login ask my credential in 3 step .. but it's not working : <br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">meepmeep@Marvin:~$ ssh dev.box<br />Yubikey for `meepmeep':<br />Password:<br />Read from remote host dev.box: Connection reset by peer<br />Connection to dev.box closed.</div><br /><br />debug file :<div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;pam_yubico.c:parse_cfg(404)&#93; called.<br />&#91;pam_yubico.c:parse_cfg(405)&#93; flags 1 argc 4<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;0&#93;=id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;1&#93;=key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;2&#93;=debug<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;3&#93;=authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(408)&#93; id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(409)&#93; key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(410)&#93; debug=1<br />&#91;pam_yubico.c:parse_cfg(411)&#93; alwaysok=0<br />&#91;pam_yubico.c:parse_cfg(412)&#93; verbose_otp=0<br />&#91;pam_yubico.c:parse_cfg(413)&#93; try_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(414)&#93; use_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(415)&#93; authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(416)&#93; ldapserver=(null)<br />&#91;pam_yubico.c:parse_cfg(417)&#93; ldap_uri=(null)<br />&#91;pam_yubico.c:parse_cfg(418)&#93; ldapdn=(null)<br />&#91;pam_yubico.c:parse_cfg(419)&#93; user_attr=(null)<br />&#91;pam_yubico.c:parse_cfg(420)&#93; yubi_attr=(null)<br />&#91;pam_yubico.c:pam_sm_authenticate(452)&#93; get user returned: meepmeep<br />&#91;pam_yubico.c:pam_sm_authenticate(542)&#93; conv returned: &lt;YUBIKEY-TOKEN-ID&gt;vcutccutjtggbgnjjcgjbjlncudivkvl<br />&#91;pam_yubico.c:pam_sm_authenticate(558)&#93; OTP: &lt;YUBIKEY-TOKEN-ID&gt;vcutccutjtggbgnjjcgjbjlncudivkvl ID: &lt;YUBIKEY-TOKEN-ID&gt; <br />&#91;pam_yubico.c:pam_sm_authenticate(583)&#93; ykclient return value (0): Success<br />&#91;pam_yubico.c:check_user_token(117)&#93; Authorization line: meepmeep:&lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:check_user_token(121)&#93; Matched user: meepmeep<br />&#91;pam_yubico.c:check_user_token(125)&#93; Authorization token: &lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:check_user_token(128)&#93; Match user/token as meepmeep/&lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:pam_sm_authenticate(625)&#93; done. &#91;Success&#93;<br />&#91;pam_yubico.c:parse_cfg(404)&#93; called.<br />&#91;pam_yubico.c:parse_cfg(405)&#93; flags 2 argc 4<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;0&#93;=id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;1&#93;=key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;2&#93;=debug<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;3&#93;=authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(408)&#93; id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(409)&#93; key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(410)&#93; debug=1<br />&#91;pam_yubico.c:parse_cfg(411)&#93; alwaysok=0<br />&#91;pam_yubico.c:parse_cfg(412)&#93; verbose_otp=0<br />&#91;pam_yubico.c:parse_cfg(413)&#93; try_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(414)&#93; use_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(415)&#93; authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(416)&#93; ldapserver=(null)<br />&#91;pam_yubico.c:parse_cfg(417)&#93; ldap_uri=(null)<br />&#91;pam_yubico.c:parse_cfg(418)&#93; ldapdn=(null)<br />&#91;pam_yubico.c:parse_cfg(419)&#93; user_attr=(null)<br />&#91;pam_yubico.c:parse_cfg(420)&#93; yubi_attr=(null)<br />&#91;pam_yubico.c:pam_sm_setcred(640)&#93; called.<br />&#91;pam_yubico.c:pam_sm_setcred(646)&#93; retval: -1216685976</div><br /><br />Finally, I try to put the line <br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">auth required pam_yubico.so id=&lt;myID&gt; key=&lt;myKey&gt; debug authfile=/etc/yubikey_mappings<br /></div><br /><strong>at the end</strong> of the /etc/pam.d/sshd (so the OTP is ask after my password), I get the same error on the client side (connection closed), and I get this debug file :<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;pam_yubico.c:parse_cfg(404)&#93; called.<br />&#91;pam_yubico.c:parse_cfg(405)&#93; flags 1 argc 4<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;0&#93;=id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;1&#93;=key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;2&#93;=debug<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;3&#93;=authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(408)&#93; id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(409)&#93; key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(410)&#93; debug=1<br />&#91;pam_yubico.c:parse_cfg(411)&#93; alwaysok=0<br />&#91;pam_yubico.c:parse_cfg(412)&#93; verbose_otp=0<br />&#91;pam_yubico.c:parse_cfg(413)&#93; try_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(414)&#93; use_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(415)&#93; authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(416)&#93; ldapserver=(null)<br />&#91;pam_yubico.c:parse_cfg(417)&#93; ldap_uri=(null)<br />&#91;pam_yubico.c:parse_cfg(418)&#93; ldapdn=(null)<br />&#91;pam_yubico.c:parse_cfg(419)&#93; user_attr=(null)<br />&#91;pam_yubico.c:parse_cfg(420)&#93; yubi_attr=(null)<br />&#91;pam_yubico.c:pam_sm_authenticate(452)&#93; get user returned: meepmeep<br />&#91;pam_yubico.c:pam_sm_authenticate(542)&#93; conv returned: &lt;YUBIKEY-TOKEN-ID&gt;flcrldfivfhbgdelulijvkcljudvgbll<br />&#91;pam_yubico.c:pam_sm_authenticate(558)&#93; OTP: &lt;YUBIKEY-TOKEN-ID&gt;flcrldfivfhbgdelulijvkcljudvgbll ID: &lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:pam_sm_authenticate(583)&#93; ykclient return value (0): Success<br />&#91;pam_yubico.c:check_user_token(117)&#93; Authorization line: meepmeep:&lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:check_user_token(121)&#93; Matched user: meepmeep<br />&#91;pam_yubico.c:check_user_token(125)&#93; Authorization token: &lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:check_user_token(128)&#93; Match user/token as meepmeep/&lt;YUBIKEY-TOKEN-ID&gt;<br />&#91;pam_yubico.c:pam_sm_authenticate(625)&#93; done. &#91;Success&#93;<br />&#91;pam_yubico.c:parse_cfg(404)&#93; called.<br />&#91;pam_yubico.c:parse_cfg(405)&#93; flags 2 argc 4<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;0&#93;=id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;1&#93;=key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;2&#93;=debug<br />&#91;pam_yubico.c:parse_cfg(407)&#93; argv&#91;3&#93;=authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(408)&#93; id=&lt;MyID&gt;<br />&#91;pam_yubico.c:parse_cfg(409)&#93; key=&lt;MyKey&gt;<br />&#91;pam_yubico.c:parse_cfg(410)&#93; debug=1<br />&#91;pam_yubico.c:parse_cfg(411)&#93; alwaysok=0<br />&#91;pam_yubico.c:parse_cfg(412)&#93; verbose_otp=0<br />&#91;pam_yubico.c:parse_cfg(413)&#93; try_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(414)&#93; use_first_pass=0<br />&#91;pam_yubico.c:parse_cfg(415)&#93; authfile=/etc/yubikey_mappings<br />&#91;pam_yubico.c:parse_cfg(416)&#93; ldapserver=(null)<br />&#91;pam_yubico.c:parse_cfg(417)&#93; ldap_uri=(null)<br />&#91;pam_yubico.c:parse_cfg(418)&#93; ldapdn=(null)<br />&#91;pam_yubico.c:parse_cfg(419)&#93; user_attr=(null)<br />&#91;pam_yubico.c:parse_cfg(420)&#93; yubi_attr=(null)<br />&#91;pam_yubico.c:pam_sm_setcred(640)&#93; called.<br />&#91;pam_yubico.c:pam_sm_setcred(646)&#93; retval: 0<br /></div><br /><br />(the last &quot;retval&quot; is different, but I don't know what it means !)<br /><br />I'm open to any idea <img src="https://forum.yubico.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" /><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1513">meepmeep</a> — Wed Jan 26, 2011 12:17 pm</p><hr />
]]></content>
</entry>
</feed>