How to attach to a session created on a remote server with my local tmux client ?

I known I can install tmux on the remote machine and do something like ssh -t ... tmux attach. But I want my local configuration, clipboard, etc...

There is a lot of questions about this but the answer is always about nesting tmux instances. I don't want to do this.

Is it possible ? If yes, is it possible to leave detached session on the remote (with tmux installed on the remote machine) ? If no, is there alternatives to tmux that can do that?

  • No comment, no asnwer. Is there anything that can be said about this?
    – KcFnMi
    Aug 4 '18 at 3:30

No, this is not possible to do as you wanted. Tmux requires nested sessions for connecting to a remote session.

You indeed need to do SSH connection and then attach the session. This way tmux uses configuration of the remote server. Again, as you didn't want.

Maybe in the future this feature will be added to tmux. Sorry.

I don't know if screen supports this kind of feature. That might be an alternative, if it does.

  • 1
    I ended up either copy the local config on the remote machine (tmux -f) and lose the clipboard or run tmux locally and spawn an ssh connection for every tab/pane.
    – juloo65
    Nov 5 '18 at 10:37
  • Great! That is exactly how one would do this, without the feature. I tried to search if screen has this feature, but I couldn't anything (it probably doesn't have it). Nov 5 '18 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.