When you use ssh agent, tmux or screen session gets it from environment variable SSH_AUTH_SOCK . Variable keeps path to socket, that was created for this connection. You close connection and create new one, then you attach to saved session. Now ssh to other servers from shells in this session won’t work, because it has old SSH_AUTH_SOCK value. Here is workaround to fix it:

.bashrc :