Inside tmux we ssh to a server that doesn't run tmux
local>tmux send-key C-p # works
local>ssh user@remote
user@remote> tmux send-key C-p
tmux: command not found
It looks like this more of ssh question.
Inside tmux we ssh to a server that doesn't run tmux
local>tmux send-key C-p # works
local>ssh user@remote
user@remote> tmux send-key C-p
tmux: command not found
It looks like this more of ssh question.
To communicate with bash, tmux session uses 'unix socket'. That's why installing tmux on remote machine won't help.
What will work is reverse-ssh to your local machine and execute tmux command like:
user@remote> ssh user@local 'tmux send-key C-p'