Copying in tmux puts text in a tmux buffer, which your desktop does not know about. Over SSH the gap gets wider, because the clipboard I want is on the machine in front of me.
tmux can ask the terminal to set its clipboard with an escape sequence. The option for it:
set -g set-clipboard on
The manual describes three values. With on, tmux accepts the escape sequence to create a buffer and also tries to set the terminal clipboard. With external, tmux sets the terminal clipboard but ignores applications that try to set tmux buffers. With off, it does neither.
Which one to pick depends on how much you trust what runs in your panes. external keeps a program in a pane from writing into your tmux buffers, while your own copy-mode selections still reach the system clipboard.
set -g set-clipboard external
The manual says tmux only attempts this when there is an Ms entry in the terminfo description of your terminal. For xterm it adds a note: the feature has to be enabled there with the resource disallowedWindowOps: 20,21,SetXprop, or by changing that property in the xterm menu.
The caveat is that terminals differ. Some ask for permission or have the feature switched off by default. If nothing lands on the clipboard after a copy, check the terminal’s settings first and tmux second.
Further reading: tmux manual (set-clipboard)