I have a server with tmux and a client with tmux. If I connect to my server I have running 2 tmux sessions, one from the client and one from the server. Is there a way to detach the clients sessions when connected to ssh, and reattach it when I close ssh?

  • What do you mean "detach the client's sessions"? Do you mean: Upon sshing to the server, only display the active (the one that ran ssh) client tmux pane (with the possibility of using tmux on the server)?
    – evan.bovie
    May 2, 2014 at 20:37
  • Yes, I want to detach the session that was started first(the one on my home PC) and only display the one that is running on my server May 2, 2014 at 20:40

1 Answer 1


I don't think this is really possible, but with the combination of maximizing a tmux pane by typing

ctrl+b z

and sending the ctrl+b twice to interact with the remote tmux session, you should achieve your goal.

  • OK, i will try this later, seems to be quite a good workaround May 3, 2014 at 7:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .