{"id":1301,"date":"2017-11-21T09:49:44","date_gmt":"2017-11-21T16:49:44","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1301"},"modified":"2017-11-21T09:49:44","modified_gmt":"2017-11-21T16:49:44","slug":"yubikey-4-gpg-key-generation-ubuntu","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/yubikey-4-gpg-key-generation-ubuntu\/","title":{"rendered":"Yubikey 4 GPG key generation (Ubuntu)"},"content":{"rendered":"<p>Install supporting software<\/p>\n<pre><code>sudo apt-add-repository ppa:yubico\/stable\nsudo apt-get update\nsudo apt-get install scdaemon -y\nsudo apt-get install python-setuptools python-crypto python-pyscard python-pyside pyside-tools libykpers-1-1 pcscd -y\nsudo apt-get install yubioath-desktop yubikey-personalization yubikey-personalization-gui yubikey-manager  -y\n<\/code><\/pre>\n<p>Insert Yubikey and Generate key<\/p>\n<pre><code>gpg --card-edit\ngpg\/card&gt; admin\ngpg\/card&gt; generate\ngpg\/card&gt; quit\n<\/code><\/pre>\n<p>export and backup the public keys, because the Yubikey only stores the private portion of the key<\/p>\n<pre><code>gpg --armor --export $KEYID &gt; mykey.pub\n<\/code><\/pre>\n<p>Require touching the Yubikey button to authenticate, sign, or encrypt:<\/p>\n<pre><code>ykman openpgp touch aut on \nykman openpgp touch sig on \nykman openpgp touch enc on \n<\/code><\/pre>\n<p>Change the pin<\/p>\n<pre><code>gpg --card-edit\ngpg\/card&gt; admin\ngpg\/card&gt; passwd\ngpg\/card&gt; quit\n<\/code><\/pre>\n<p>Change yubikey information<\/p>\n<pre><code>gpg --card-edit\ngpg\/card&gt; name\ngpg\/card&gt; lang\ngpg\/card&gt; quit\n<\/code><\/pre>\n<p>References:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.yubico.com\/support\/knowledge-base\/categories\/articles\/use-yubikey-openpgp\/\">https:\/\/www.yubico.com\/support\/knowledge-base\/categories\/articles\/use-yubikey-openpgp\/<\/a><\/li>\n<li><a href=\"https:\/\/yawnbox.com\/2015\/11\/23\/yubikey-4-and-ubuntu-15-10\/\">https:\/\/yawnbox.com\/2015\/11\/23\/yubikey-4-and-ubuntu-15-10\/<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/drduh\/YubiKey-Guide\">https:\/\/github.com\/drduh\/YubiKey-Guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Install supporting software sudo apt-add-repository ppa:yubico\/stable sudo apt-get update sudo apt-get install scdaemon -y sudo apt-get install python-setuptools python-crypto python-pyscard python-pyside pyside-tools libykpers-1-1 pcscd -y sudo apt-get install yubioath-desktop yubikey-personalization yubikey-personalization-gui yubikey-manager -y Insert Yubikey and Generate key gpg &#8211;card-edit gpg\/card&gt; admin gpg\/card&gt; generate gpg\/card&gt; quit export and backup the public keys, because the Yubikey &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/yubikey-4-gpg-key-generation-ubuntu\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Yubikey 4 GPG key generation (Ubuntu)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,16,17,30],"tags":[],"class_list":["post-1301","post","type-post","status-publish","format-standard","hentry","category-linux","category-security","category-tech","category-tools"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1301"}],"version-history":[{"count":3,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1301\/revisions"}],"predecessor-version":[{"id":1304,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1301\/revisions\/1304"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}