Skip to content

Commit

Permalink
Much simpler (working?) ssh-agent example
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
  • Loading branch information
ckujau committed Mar 22, 2020
1 parent e6b6e6b commit 915b0a0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions shell.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,8 @@ function pwdx {
lsof -a -p "${1}" -d cwd -n | tail -1 | awk '{print $NF}'
}

# SSH Agent
if ! pgrep -u "${USER}" ssh-agent > /dev/null; then
ssh-agent | grep -v 'Agent pid' > "${XDG_RUNTIME_DIR}/ssh-agent.env"
eval "$(<"${XDG_RUNTIME_DIR}/ssh-agent.env")"
fi

if [ ! "${SSH_AUTH_SOCK}" ]; then
eval "$(<"${XDG_RUNTIME_DIR}/ssh-agent.env")"
fi
# https://www.funtoo.org/Keychain
eval $(keychain --eval --quiet)

# dmesg: translate relative printk time stamps to absolute time stamps
function kmsg() {
Expand Down

0 comments on commit 915b0a0

Please sign in to comment.