{"id":46,"date":"2023-02-01T13:13:06","date_gmt":"2023-02-01T13:13:06","guid":{"rendered":"https:\/\/www.nuclearwaffle.com\/?p=46"},"modified":"2023-02-01T13:13:06","modified_gmt":"2023-02-01T13:13:06","slug":"uploading-the-correct-acme-keys-to-your-sftp-upload-client","status":"publish","type":"post","link":"https:\/\/www.nuclearwaffle.com\/?p=46","title":{"rendered":"Uploading the correct ACME keys to your SFTP upload client"},"content":{"rendered":"\n<p>So you&#8217;ve got OPNsense as a router, and you&#8217;re trying to shove certificates around using the ACME client automations, and it&#8217;s not going well. You try to test the connection and all you get is Permission Denied (publickey, password) errors.<\/p>\n\n\n\n<p>The fix is to upload the correct key to the correct place. The issue is, ACME uses a different set of public\/private keys that any other user does. It&#8217;s doing its own thing. And that means you need to get its keys, not the keys of any particular user.<\/p>\n\n\n\n<p>What I&#8217;m going to describe next may be easier with ssh-copy-id or similar, but OPNsense doesn&#8217;t have it so you get to do it manually.<\/p>\n\n\n\n<p>Login to your OPNsense router via ssh.<\/p>\n\n\n\n<p>Copy out the contents of the id_rsa.pub file at \/var\/etc\/acme-client\/sftp-config\/id.rsa.pub.<\/p>\n\n\n\n<p>Login to your client device (whatever&#8217;s going to accept the key) as the correct user (whichever user you&#8217;re going to have doing the ssh stuff).<\/p>\n\n\n\n<p>Copy in the public key to <em>that user&#8217;s<\/em> ~\/.ssh\/authorized_keys file.<\/p>\n\n\n\n<p>Test the connection:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"253\" height=\"48\" src=\"https:\/\/www.nuclearwaffle.com\/wp-content\/uploads\/2023\/02\/image.png\" alt=\"\" class=\"wp-image-47\"\/><\/figure>\n\n\n\n<p>If you got it right, you should see this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"62\" src=\"https:\/\/www.nuclearwaffle.com\/wp-content\/uploads\/2023\/02\/image-1.png\" alt=\"\" class=\"wp-image-48\" srcset=\"https:\/\/www.nuclearwaffle.com\/wp-content\/uploads\/2023\/02\/image-1.png 321w, https:\/\/www.nuclearwaffle.com\/wp-content\/uploads\/2023\/02\/image-1-300x58.png 300w\" sizes=\"auto, (max-width: 321px) 100vw, 321px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;ve got OPNsense as a router, and you&#8217;re trying to shove certificates around using the ACME client automations, and it&#8217;s not going well. You try to test the connection and all you get is Permission Denied (publickey, password) errors. The fix is to upload the correct key to the correct place. The issue is,&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":1,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":49,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions\/49"}],"wp:attachment":[{"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nuclearwaffle.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}