On a linux server how do you use multiple terminals over a single ssh connection?

Solution 1:

Just use GNU screen, it's great as you can start up remote sessions and restore them if your connection drops. It's available as a package for most distributions and may even already be installed on your university system.

The manual will give you all you need to get started, by default all commands are preceeded by Ctrl+A. For example to bring up the onscreen help, just press Ctrl+A then press ?

Solution 2:

screen allows you to have multiple terminals and more (such as the ability to detach and re-attach to your session).

Some notes to get you going:

Ctrl-a c   create
Ctrl-a d   detach
screen -r  reattach
Ctrl-a a   toggle
Ctrl-a "   list

And some recommended reading:

  • http://en.wikipedia.org/wiki/GNU_Screen
  • http://jmcpherson.org/screen.html
  • http://blogamundo.net/code/screen
  • http://www.kuro5hin.org/story/2004/3/9/16838/14935

Solution 3:

Take a look at the following two articles on SSH connection sharing:

http://fermiparadox.wordpress.com/2008/06/19/ssh-connection-sharing/
http://protempore.net/~calvins/howto/ssh-connection-sharing/

Basically, do a google search on ssh connection sharing and you'll find a bunch of other articles on it.


Solution 4:

Possibly, you could use X forwarding to open multiple remote xterms on your local desktop.


Solution 5:

You give no compelling reason why you can't use private keys from the other systems. Generate them per-machine and add the applicable keys to authorized_hosts

Still, use screen.

Tags:

Linux

Ssh