Reconnecting your SSH agent to a detached GNU screen session | tolaris.com - 3 views
-
David Corking on 06 Aug 13This is almost perfect! For me, on Debian 7.1, Remi's code needed a small tweak. I put backticks around `whoam`i It allows me to use git push/pull after I have disconnected and reconnected to a screen session. SSH_AUTH_SOCK=$(find /tmp/ssh-* -user `whoami` -name agent\* -printf '%T@ %p\n' 2>/dev/null | sort -k 1nr | sed 's/^[^ ]* //' | head -n 1)