Context
I SSH to a remote host forwarding my local SSH agent (using ssh -A).
I launch tmux on the remote host, I can see and have access to my forwarded ssh keys.
All is fine.
Then I either logout or the remote connection is lost.
This leaves the tmux session running on the tmux server.
I SSH back in to the remote host using ssh -A
and reconnect to the existing tmux session.
However this time, back in tmux I cannot list (ssh-add -l
) nor have access to my public keys whereas I expected them to be present.
Why?
The temporary socket used by ssh has been wiped out when I ended the SSH session or when the process ended by timing out for whatever reason (remote connection lost...).
Iโll get a new one the next time I SSH back in.
However Tmux is not aware of the new socket and still tries to use the old one which of course does not work.