How to have multiple windows in a SSH terminal session?

Solution 1:

The screen utility will allow to have multiple windows in a session. (You will have to install it on the server end)

This guy shows you the commands for how to split your views within the same terminal window.

It's also useful for re-connecting to a dropped session.

UPDATE:

Note that screen and tmux sessions will all "live" within one session which will still only give you one window or tab on OSX terminal app itself (even though these utilities allow you to have multiple "windows/views" within that view). See comments from this user:

ssh connections are a single process running in one shell, and when you create a new tab you are creating a new local shell that will not be running this process. Furthermore the remote server will not accept a duplicate connection from you without authentication. In essence, this is impossible to do. The closest thing you can do is make use of the bash history, and press the up arrow to scroll through your most recent commands until you get to the ssh command you used for your current connection, and then execute it.

If you still desire to have multiple windows/tabs in the OSX terminal app itself you will need to "login" multiple times. Several users have created scripts to try to aid this process.

This users solution might work best for you. This user creates a menu for his remote connections.

Other solutions I've seen only work with local sessions, but the idea is similar.

Solution 2:

tmux is a newer option similar to screen. It may be easier to find for newer operating systems than screen. You can find the documentation here