{"id":167,"date":"2017-02-24T19:03:33","date_gmt":"2017-02-25T03:03:33","guid":{"rendered":"http:\/\/www.gauntletwizard.net\/wordpress\/?p=167"},"modified":"2017-06-14T13:19:01","modified_gmt":"2017-06-14T21:19:01","slug":"167","status":"publish","type":"post","link":"https:\/\/www.gauntletwizard.net\/wordpress\/?p=167","title":{"rendered":"Security"},"content":{"rendered":"<p>The big companies I&#8217;ve worked at have all had been using security policies. The small companies haven&#8217;t. Frequently, all access to production machines have been controlled by a single shared ssh key. This sucks, but is inevitable, given the lack of time to spend on tooling. However, there are some low-cost toolings to make this better.<\/p>\n<p>The basic developer workflow has been &#8211; Type in a command, which will generate a SSH certificate, then ask you for your password and u2f auth, and it&#8217;ll talk to the central signing server and get that cert signed. This is surprisingly doable for a small org &#8211; <a href=\"https:\/\/github.com\/Netflix\/bless\">BLESS<\/a> and <a href=\"https:\/\/github.com\/mikesmitty\/curse\">CURSE<\/a> are two alternatives.<\/p>\n<p>For myself, though, the right thing to do is run ssh-agent. ssh-agent allows you to keep your keys in memory, and can support several keys. It also allows for forwarding the auth socket to a remote host &#8211; So if you need to ssh through a bastion host, you don&#8217;t have to copy your SSH key to the bastion machine, it can live on your local drive and all authentication requests can go through it. ssh -A enables this forwarding. <\/p>\n<p>The other problem I&#8217;ve encountered a few times is that I want to share my ssh-agent across several terminals. This can be a blessing or a curse, but on most of my machines I only have one or two keys, and while I want them encrypted at-rest I don&#8217;t care if they&#8217;re loaded in memory a bunch. I&#8217;ve written the shell script that does this a bunch, and I today asked myself why it&#8217;s not in the default ssh toolkit (like ssh-copy-id). Well, it&#8217;s not, but there is a tool that does what I&#8217;m looking for: <a href=\"http:\/\/www.funtoo.org\/Keychain\">Keychain<\/a>, not to be confused with the OSX tool of the same name. Though, to my surprise, OSX *already has this functionality*; My default terminal opens up with an SSH_AUTH_SOCK already populated, and it&#8217;s managed by the system. That&#8217;s pretty cool.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The big companies I&#8217;ve worked at have all had been using security policies. The small companies haven&#8217;t. Frequently, all access to production machines have been controlled by a single shared ssh key. This sucks, but is inevitable, given the lack of time to spend on tooling. However, there are some low-cost toolings to make this &hellip; <a href=\"https:\/\/www.gauntletwizard.net\/wordpress\/?p=167\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Security<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/167"}],"collection":[{"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167"}],"version-history":[{"count":4,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions\/176"}],"wp:attachment":[{"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gauntletwizard.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}