{"id":55,"date":"2012-06-05T23:53:12","date_gmt":"2012-06-06T06:53:12","guid":{"rendered":"http:\/\/blog.jbrowne.com\/?p=55"},"modified":"2012-06-05T23:56:42","modified_gmt":"2012-06-06T06:56:42","slug":"55","status":"publish","type":"post","link":"https:\/\/blog.jbrowne.com\/?p=55","title":{"rendered":"ssh-agent-proxy is my new SSH love"},"content":{"rendered":"<p>Normally <a href=\"http:\/\/blog.shanemeyers.com\/\">Shane Meyers<\/a>\u00a0clues me into nifty tricks about SSH, but this one I found on my own. \u00a0Fortunately I searched for an existing solution before coding it myself. \u00a0The new love of my SSH life is <a href=\"http:\/\/idaemons.org\/projects\/ssh-agent-proxy\/\">ssh-agent-proxy<\/a>. \u00a0It solves the problem of ensuring the SSH_AUTH_SOCK environment variable\u00a0in your remote screen sessions is connected to the agent on your connecting machine (i.e. laptop.) \u00a0I&#8217;ve seen many hacks for making this connection, usually fragments spit out at login that have to be executed in each child shell. \u00a0ssh-agent-proxy solves this problem seamlessly.<\/p>\n<p>When run ssh-agent-proxy daemonizes and creates a listening socket at a well known location (default: \/tmp\/sshUID\/agent.sock). \u00a0When it receives a connection on that socket it connects it to the upstream SSH agent. \u00a0It does this by checking all files in \/tmp for the correct, live socket for a currently connected SSH connection and proxies all communication. \u00a0It also reaps dead socket files for the user in \/tmp.<\/p>\n<p>This means I can re-connect to a host, run screen -r and all SSH agent requests from all of my existing shells are connected to my current SSH session. \u00a0I downloaded the ssh-agent-proxy tarball, reviewed the code, and executed it two months ago; I&#8217;ve nearly forgotten it is running and am enjoying my pain-free ssh-agent-proxy life.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ssh-agent-proxy is an elegant solution to ensuring remote screen sessions are connected to the current SSH connection for agent access<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,7],"tags":[29,8],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-ssh","category-systems-administration","tag-ssh-2","tag-sysadmin"],"_links":{"self":[{"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":3,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jbrowne.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}