Connection timed out when running SSH connection command

Can you install tmux or screen on the Pi? I haven’t used
screen, but I’ve used tmux to deal with the connection timeout issues in the past. You don’t have to become a tmux super user to use it: Getting Started · tmux/tmux Wiki · GitHub