add SSH_AUTH_SOCK workaround for tmux

This commit is contained in:
Knut Ahlers 2016-07-21 16:00:17 +02:00
parent 5f94431aa9
commit 82a4af41f4
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

10
.ssh/rc Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
# http://techblog.appnexus.com/2011/managing-ssh-sockets-in-gnu-screen/
# https://gist.github.com/martijnvermaat/8070533
# http://stackoverflow.com/questions/21378569/how-to-auto-update-ssh-agent-environment-variables-when-attaching-to-existing-tm
# Fix SSH auth socket location so agent forwarding works with screen.
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi