答案 0 :(得分:19)
这有效:
mosh $REMOTE tmux attach # I didn't expect this to work
但这些都没有:
mosh $REMOTE "tmux attach -d" # This should probably work
mosh $REMOTE tmux attach -d # This correctly interprets -d as a mosh option
更新:正如Chris Johnson指出的那样,您可以使用' - '参数关闭选项处理,以便将整个tmux
命令作为命令发送到远程服务器:
mosh $REMOTE -- tmux attach -t 0 -d