3 ms·
I have this at the end of my ~/.bash_profile: # run under screen if we are connected via ssh if [ "$SSH_CONNECTION" ] ; then rm -f .ssh/auth-so
by mooism2 15y ago
I have this at the end of my ~/.bash_profile:
# run under screen if we are connected via ssh
if [ "$SSH_CONNECTION" ] ; then
rm -f .ssh/auth-sock
if [ -e "$SSH_AUTH_SOCK" ] ; then
ln -s "$SSH_AUTH_SOCK" .ssh/auth-sock
fi
export SSH_AUTH_SOCK=~/.ssh/auth-sock
screen -d -R
logout
fi
- pyre 15y agoNote: Don't do this if your screen session is setup to launch new shell windows as login shells...