将tmux命令从ssh会话中的远程发送到本地实例

目标是从远程服务器发送tmux命令到本地正在运行的tmux。 不运行到tmux的不同实例。

在tmux内部,我们使用ssh到不运行tmux的服务器

local>tmux send-key Cp # works local>ssh user@remote user@remote> tmux send-key Cp # this will try to find tmux instance on remote. but we want to send it the local instead. 

我不能使用键绑定,因为这将从脚本内部运行。