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

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2015-11-15T18:23:03+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=26&amp;t=2090</id>
<entry>
<author><name><![CDATA[hiviah]]></name></author>
<updated>2015-11-15T18:23:03+01:00</updated>
<published>2015-11-15T18:23:03+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=2090&amp;p=7973#p7973</id>
<link href="https://forum.yubico.com/viewtopic.php?t=2090&amp;p=7973#p7973"/>
<title type="html"><![CDATA[Notes on SSH+PIV]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=2090&amp;p=7973#p7973"><![CDATA[
I'd add some notes to this article:<br /><br /><!-- m --><a class="postlink" href="https://developers.yubico.com/yubico-piv-tool/SSH_with_PIV_and_PKCS11.html">https://developers.yubico.com/yubico-pi ... KCS11.html</a><!-- m --><br /><br />First, to remove the PKCS#11 lib from the ssh-agent, you need:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">ssh-add -e $OPENSC_LIBS/opensc-pkcs11.so</div><br /><br />Using &quot;ssh-add -D&quot; won't work even though &quot;ssh-add -l&quot; will keep telling you that the identity has been removed. Even if you add the PKCS#11 token with timeout (-t parameter to ssh-add), you'll need to use the above &quot;ssh-add -e&quot; to remove it after the time expires. This is quite confusing and took me some time to figure out (it seems more like a bug, really).<br /><br />On older distros (Scientific Linux 6.7/Centos 6.7) the &quot;ssh-keygen -D /usr/lib64/opensc-pkcs11.so -e&quot; seems to be broken - it won't output the token's public key, but some other key's (like id_rsa). One way to do the equivalent is to use &quot;ssh-add -L&quot; after adding the PKCS#11 token via &quot;ssh-add -s&quot;. Another workaround is to convert the public.pem to ssh format through some script.<br /><br />If you encounter error that says yubico-piv-tool can't communicate with card, check if process called &quot;pcsc-wrapper&quot; is not running - it's part of gnupg and it's preventing yubico-piv-tool from communicating with the card (just kill pcsc-wrapper).<br /><br />I've tried also working with the token using pkcs15-tool from OpenSC, but it seems largely not helpful. It can dump token contents via &quot;pkcs15-tool -D&quot;, but that's about it. Using it to export public key in PEM/ssh format fails with <em>Public key enumeration failed: Not implemented</em>.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2457">hiviah</a> — Sun Nov 15, 2015 6:23 pm</p><hr />
]]></content>
</entry>
</feed>