Skip to content

Instantly share code, notes, and snippets.

View tomquisel's full-sized avatar

Tom Quisel tomquisel

View GitHub Profile
@tomquisel
tomquisel / findagent
Created February 7, 2015 00:00
find ssh agent socket
function findagent {
if ssh-add -l; then
echo "Your SSH Agent is already working."
return 0
fi
for sock in `ls /tmp/ssh-*/agent.*`; do
export SSH_AUTH_SOCK=$sock
if ssh-add -l; then
echo "Your SSH Agent is fixed. New socket=$sock."
return 0