Single ssh-agent across multiple terminals. Put this in ~/.profile
so it is executed after login
export SSH_AUTH_SOCK=~/.ssh/ssh-agent.$HOSTNAME.sock
ssh-add -l 2>/dev/null >/dev/null
if [ $? -ge 2 ]; then
ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null
fi
Vim sometime start slow if there are multiple user sesssions (not sure why)…
To kill user session when logout, change sudo vim /etc/systemd/logind.conf
KillUserProcessses=yes