Linux – Can tmux pane remote ssh-connection

linuxtmux

Can I run tmux locally and connect via ssh to remote machine.. and after that any new pane and/or screen to be with the remote-machine-shell…
What I'm saying I can't install tmux on the remote machine, but I don't want to do a ssh connection from every pane, but ssh-login just once.

Is such thing possible..
thanks

Best Answer

If you want to login just once, you can use ControlMaster feature of ssh. Add some config like this to your ~/.ssh/config:

ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r

If you login to the same server (as the same user) multiple times (either in one tmux or not), ssh will reuse the connection so that you don't need to make connection and login again.

Related Topic