I am using tmux on a remote machine that I access over ssh. For some reason, the tmux sessions do not persist between consecutive ssh login sessions. I do not have this issue while logging into this other remote machine that I have access to. This is essentially the same issue as described in this question.
However, the machine that I use already uses ssh.service
rather than ssh.socket
, so the accepted answer does not work for me.
Exact steps taken:
- Login to the machine via ssh
- Start a tmux session, do some work.
- Detach session, and possibly attach again (this works).
- Log out with Ctrl+D.
- Login again and try tmux a or tmux ls (doesn't work).
KillMode=process
option, listed in the answer you linked to? If that works, then this is actually a duplicate.KillMode=process
is what I have by default in theService
section ofsshd.service
.