多个 Tmux Terminal.app windows

Tmux in multiple Terminal.app windows

我只是在试用 Tmux,这样我就可以避免一次又一次地通过 ssh 连接到同一台主机。我喜欢 tmux 提供的窗格和 windows,但这是我的症结所在:

  1. 我必须通过 ssh 连接到一个单独的服务器 (server1),使用 Duo 进行身份验证,然后从该服务器通过 ssh 连接到我的最终目的地 (server2)。使用 Duo 进行身份验证很痛苦,所以我宁愿能够进行一次,然后从服务器 1 进行多路复用。
  2. 我的设置有 2 个显示器,我宁愿有 2 个单独的 Terminal.app windows。如果我制作一个长 window,它会在显示器之间被切断。
  3. 我找不到将 tmux window 移动到新 Terminal.app window 的方法。我可以手动打开另一个终端 window,ssh 进入 server1,启动 tmux,然后 attach/new-session -t 进入一个组,但这违背了第 1 点。

有没有办法做我想做的事?以下是一些接近的东西:

这是一个理想的图形:

由于您使用的是 OS X,因此请尝试将 iTerm 与 tmux 集成 - 它可能会为您提供所需的东西。

When you run "tmux -CC", a new tmux session is created. An iTerm2 window opens and it acts like a normal iTerm2 window. The difference is that when iTerm2 quits or the ssh session is lost, tmux keeps running. You can return to the host you were ssh'ed into and run "tmux -CC attach" and the iTerm2 windows will reopen in the same state they were in before.