Using tmux - scrolling via ssh
Solution 1:
Assuming your terminal program is not hijacking the mouse wheel inputs, you should be able to add this to your $HOME/.tmux.conf
(for tmux >= 2.1)
set-option -g mouse on
Depending upon your terminal program, this option may help as well, allowing tmux
to tell your terminal that it wants more control over the contents of the terminal window.
setw -g alternate-screen on
Regarding your comment:
Sometimes I can scroll off the tmux window and see the tmux attach command. Is that normal?
If you haven't set that option in your tmux
config, then yes, that is expected. You are likely scrolling back in the buffer history of your terminal program rather than tmux's buffer.
Finally, more information can be found in other questions that are essentially the same: here, generically and here (for MacOS and iTerm)