I'm a bit of a tmux novice, so there may be a really easy answer to this question, but the title pretty much sums up the question.
Let's say I am ssh'd into a server in a tmux window and I go <prefix>-C. All of a sudden I have to ssh again, which can get annoying. Is there any way to automatically realise that I'm opening up another window from an ssh window already and run that same command in the new window automatically?