From cb2873de869b6b4c9f7c56071f4b4a5c4b00b801 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 9 Nov 2011 14:20:01 -0500 Subject: [PATCH] Add .bashrc blurb for picking up agent info to SSH post. --- posts/SSH.mdwn | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 ---------------------------------- -- 2.26.2