{"id":132,"date":"2023-03-04T15:09:32","date_gmt":"2023-03-04T14:09:32","guid":{"rendered":"https:\/\/blubb.fish\/?p=132"},"modified":"2023-10-18T10:11:01","modified_gmt":"2023-10-18T08:11:01","slug":"save-ssh-passphrase","status":"publish","type":"post","link":"https:\/\/blubb.fish\/index.php\/2023\/03\/04\/save-ssh-passphrase\/","title":{"rendered":"Save ssh passphrase"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To sace the passphrase and only enter it once add this to your .bashrc<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SSH_ENV=$HOME\/.ssh\/environment\n\n \n\n# start the ssh-agent\n\nfunction start_agent {\n\n    echo \"Initializing new SSH agent...\"\n\n    # spawn ssh-agent\n\n    \/usr\/bin\/ssh-agent | sed 's\/^echo\/#echo\/' > \"${SSH_ENV}\"\n\n    echo succeeded\n\n    chmod 600 \"${SSH_ENV}\"\n\n    . \"${SSH_ENV}\" > \/dev\/null\n\n    \/usr\/bin\/ssh-add\n\n}\n\n \n\nif &#91; -f \"${SSH_ENV}\" ]; then\n\n     . \"${SSH_ENV}\" > \/dev\/null\n\n     ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > \/dev\/null || {\n\n        start_agent;\n\n    }\n\nelse\n\n    start_agent;\n\nfi\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After this you can logout and login aggain and will be asked for your passphrase. This will be saved and used for each connection to new servers<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To sace the passphrase and only enter it once add this to your .bashrc After this you can logout and login aggain and will be asked for your passphrase. This will be saved and used for each connection to new servers<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,3],"tags":[],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-linux"],"_links":{"self":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/comments?post=132"}],"version-history":[{"count":1,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/posts\/132\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/media?parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/categories?post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blubb.fish\/index.php\/wp-json\/wp\/v2\/tags?post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}