<?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=4&amp;t=2106" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2015-11-25T19:28:57+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=4&amp;t=2106</id>
<entry>
<author><name><![CDATA[Jasper]]></name></author>
<updated>2015-11-25T19:28:31+01:00</updated>
<published>2015-11-25T19:28:31+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8023#p8023</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8023#p8023"/>
<title type="html"><![CDATA[Re: Problem with yk4 and PIV]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8023#p8023"><![CDATA[
I solved it.<br /><br />It probably has something todo with the fact that i was importing my 'old' certificate and using cli-tools and gui through one another.<br /><br />Here was my solution:<br />I've started <div class="codetitle"><b>Code:</b></div><div class="codecontent">yubico PIV manager 1.1.1</div><br />tried to delete the certificate that was loaded, somehow it complained about the management while it was asking for my pin.<br />Then i entered a wrong for few times because i was fed up with that..<br />after resetting it, (all within the gui), setting a new pin, i generated a new certificate.<br />In terminal i tried <div class="codetitle"><b>Code:</b></div><div class="codecontent">ssh-keygen -D /usr/local/lib/opensc-pkcs11.so</div> and it gave me a new pubkey.<br />I added that to my server and everything worked.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4049">Jasper</a> — Wed Nov 25, 2015 7:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jasper]]></name></author>
<updated>2015-11-25T09:01:34+01:00</updated>
<published>2015-11-25T09:01:34+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8016#p8016</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8016#p8016"/>
<title type="html"><![CDATA[Re: Problem with yk4 and PIV]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8016#p8016"><![CDATA[
I've erased everything again according to <a href="http://forum.yubico.com/viewtopic.php?f=26&amp;t=1941" class="postlink">http://forum.yubico.com/viewtopic.php?f=26&amp;t=1941</a><br />rebooted<br />imported pem<br />but now it's telling me this:<br /><br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Enter PIN for 'PIV_II (PIV Card Holder pin)':<br /><span style="color: #FF0040">C_Sign failed: 32</span><br />no such identity: /Users/jasper/.ssh/id_ed25519: No such file or directory<br />Permission denied (publickey,keyboard-interactive).<br /></div><br /><br />When i'm passing in a wrong pin, it gives me:<br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />C_Login failed: 160<br /></div><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4049">Jasper</a> — Wed Nov 25, 2015 9:01 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Jasper]]></name></author>
<updated>2015-11-25T19:28:57+01:00</updated>
<published>2015-11-24T21:04:33+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8014#p8014</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8014#p8014"/>
<title type="html"><![CDATA[[Solved] Problem with yk4 and PIV]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2106&amp;p=8014#p8014"><![CDATA[
I'm trying to get PIV working again after i erased everything from my yk4.<br /><br />I ran into some problems after testing all different things and erasing slot 1 &amp; 2<br />Before i ran into troubles i found the tutorial on <!-- m --><a class="postlink" href="http://www.jupiterbroadcasting.com/85062/ssh-authentication-with-yubikey-las-373/">http://www.jupiterbroadcasting.com/8506 ... y-las-373/</a><!-- m --> and had SSH auth. with PIV working.<br /><br />After i erased both slots, i imported the certificate again (yubico-piv-tool -a import-certificate -s 9a -i cert.pem ), and everything looked okay.<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">ssh-add -L</div> gives me the same public key as before<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">ssh-keygen -D /usr/local/lib/opensc-pkcs11.so</div> gives also the same pubkey<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">→ opensc-tool --list-readers<br /># Detected readers (pcsc)<br />Nr.  Card  Features  Name<br />0    Yes             Yubico Yubikey 4 OTP+U2F+CCID</div><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">→ opensc-tool -n<br />Using reader with a card: Yubico Yubikey 4 OTP+U2F+CCID<br />PIV-II card</div><br /><br />In <div class="codetitle"><b>Code:</b></div><div class="codecontent">/etc/ssh/ssh_config</div> the last line is.<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">PKCS11Provider /usr/local/lib/opensc-pkcs11.so</div><br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">→ ssh -v ds<br />OpenSSH_6.9p1, LibreSSL 2.1.7<br />debug1: Reading configuration data /Users/jasper/.ssh/config<br />debug1: /Users/jasper/.ssh/config line 1: Applying options for *<br />debug1: /Users/jasper/.ssh/config line 20: Applying options for ds<br />debug1: Reading configuration data /etc/ssh/ssh_config<br />debug1: /etc/ssh/ssh_config line 20: Applying options for *<br />debug1: /etc/ssh/ssh_config line 102: Applying options for *<br />debug1: Connecting to diskstation &#91;fe80::211:32ff:fe2c:429%en1&#93; port 22.<br />debug1: Connection established.<br />debug1: manufacturerID &lt;OpenSC (www.opensc-project.org)&gt; cryptokiVersion 2.20 libraryDescription &lt;Smart card PKCS#11 API&gt; libraryVersion 0.0<br />debug1: label &lt;PIV_II (PIV Card Holder pin)&gt; manufacturerID &lt;piv_II&gt; model &lt;PKCS#15 emulate&gt; serial &lt;dfe90784a4debfe&gt; flags 0x40d<br />debug1: have 1 keys<br />debug1: pkcs11_provider_unref: 0x7f96834013d0 refcount 2<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_rsa type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_rsa-cert type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_dsa type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_dsa-cert type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_ecdsa type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_ecdsa-cert type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_ed25519 type -1<br />debug1: key_load_public: No such file or directory<br />debug1: identity file /Users/jasper/.ssh/id_ed25519-cert type -1<br />debug1: Enabling compatibility mode for protocol 2.0<br />debug1: Local version string SSH-2.0-OpenSSH_6.9<br />debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6p2-hpn14v4<br />debug1: match: OpenSSH_6.6p2-hpn14v4 pat OpenSSH_6.5*,OpenSSH_6.6* compat 0x14000000<br />debug1: Authenticating to diskstation:22 as 'root'<br />debug1: SSH2_MSG_KEXINIT sent<br />debug1: SSH2_MSG_KEXINIT received<br />debug1: kex: server-&gt;client chacha20-poly1305@openssh.com &lt;implicit&gt; none<br />debug1: kex: client-&gt;server chacha20-poly1305@openssh.com &lt;implicit&gt; none<br />debug1: sending SSH2_MSG_KEX_ECDH_INIT<br />debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br />debug1: Server host key: ecdsa-sha2-nistp256 SHA256:DGUtiafnuStDg1mXoIY8iKk/n+qM45znekL1WpzTm+A<br />debug1: Host 'diskstation' is known and matches the ECDSA host key.<br />debug1: Found key in /Users/jasper/.ssh/known_hosts:1<br />debug1: SSH2_MSG_NEWKEYS sent<br />debug1: expecting SSH2_MSG_NEWKEYS<br />debug1: SSH2_MSG_NEWKEYS received<br />debug1: Roaming not allowed by server<br />debug1: SSH2_MSG_SERVICE_REQUEST sent<br />debug1: SSH2_MSG_SERVICE_ACCEPT received<br />debug1: Authentications that can continue: publickey,keyboard-interactive<br />debug1: Next authentication method: publickey<br />debug1: Offering RSA public key: /usr/local/lib/opensc-pkcs11.so<br />debug1: Server accepts key: pkalg ssh-rsa blen 279<br />Enter PIN for 'PIV_II (PIV Card Holder pin)':<br />debug1: Authentications that can continue: publickey,keyboard-interactive<br />debug1: Offering RSA public key: /usr/local/lib/opensc-pkcs11.so<br />debug1: Server accepts key: pkalg ssh-rsa blen 279<br />debug1: Trying private key: /Users/jasper/.ssh/id_rsa<br />debug1: Trying private key: /Users/jasper/.ssh/id_dsa<br />debug1: Trying private key: /Users/jasper/.ssh/id_ecdsa<br />debug1: Trying private key: /Users/jasper/.ssh/id_ed25519<br />no such identity: /Users/jasper/.ssh/id_ed25519: No such file or directory<br />debug1: Next authentication method: keyboard-interactive<br />debug1: Authentications that can continue: publickey,keyboard-interactive<br />debug1: No more authentication methods to try.<br />Permission denied (publickey,keyboard-interactive).</div><br /><br />without the -vvv<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">→ ssh  ds<br />Enter PIN for 'PIV_II (PIV Card Holder pin)':<br />no such identity: /Users/jasper/.ssh/id_ed25519: No such file or directory<br />Permission denied (publickey,keyboard-interactive).</div><br /><br /><br />Does anyone have any tips to get it working again?<br /><br />- Jasper<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=4049">Jasper</a> — Tue Nov 24, 2015 9:04 pm</p><hr />
]]></content>
</entry>
</feed>