From: W. Trevor King Date: Wed, 9 Nov 2011 19:20:01 +0000 (-0500) Subject: Add .bashrc blurb for picking up agent info to SSH post. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cb2873de869b6b4c9f7c56071f4b4a5c4b00b801;p=blog.git Add .bashrc blurb for picking up agent info to SSH post. --- diff --git a/posts/SSH.mdwn b/posts/SSH.mdwn index 5d6ddff..cd4006b 100644 --- a/posts/SSH.mdwn +++ b/posts/SSH.mdwn @@ -33,7 +33,16 @@ about the agent with: I usually prime the SSH agent right after I log in (before running [[screen]] or `startx`) to that new terminals come up knowing about -the agent. +the agent. You can also add something like: + + SSH_INFO_FILE="/tmp/$(whoami)/.ssh/.ssh-agent-info-$(hostname)" + if [ -f "$SSH_INFO_FILE" ]; then + . "$SSH_INFO_FILE" + fi + +to your `~/.bashrc` (or equivalent shell initialization file), after +which spawning shells will automatically pick up SSH agent +information. Grabbing a ssh-agent by process ID ----------------------------------