Created
June 18, 2020 09:36
-
-
Save inamesh/3b058c715f0564c8cca78d4656e3fb5b to your computer and use it in GitHub Desktop.
Avoid running ssh agent and attaching keys every time on Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Helper script from GitHub | |
# source: https://github.com/wwalker/ssh-find-agent | |
# (blog: http://blog.joncairns.com/2013/12/understanding-ssh-agent-and-ssh-add/) | |
#- Used in the 'Actions' section | |
. ~/scripts/ssh-find-agent.sh | |
## Setup outbound SSH. Run ssh agent and add keys | |
# This is only needed if agent is not running (e.g. after a reboot) | |
sshout () { | |
eval $(ssh-agent); | |
ssh-add ~/.ssh/pi2_cloud; | |
ssh-add ~/.ssh/pi2_local; | |
} | |
# Find the currently running ssh agent and attach it! | |
ssh_find_agent -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment