Remote server, iTerm2, and tmux integration

iterm2tmux

I want to be able to start a tmux session on a remote server, and then use iTerm2's native windows and split screens on my local machine.

For example, let's say my remote server has a tmux session running with one window that has two panes. In iTerm2 on my local machine, I want two native iTerm2 panes such that each pane contains a different tmux pane.

Is this possible?

(I know the reverse is possible — whereby I can run a tmux session on my local machine and another machine will see my iTerm2 tabs as windows for instance. But this seems kind of useless.)

Best Answer

Yes it is possible, jut make sure:

  • To have latest version of tmux installed remotely
  • Have most recent version of iterm2 installed locally

Login via ssh login@hostname -t 'tmux -CC' and voilà - this should open iTerm2 window on your local box logged into remote box.

Related Question