I often find myself opening several ssh connections in order to view several log files at a time with
This isn't a problem when I'm at home because I use public key encryption for password-less login. However, I will often use computer at my university to do this so I don't have the option of using my private key. It gets annoying to enter my password 4 or 5 times to get several terminal windows.
How can I get multiple terminals over a single connection?
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
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:
Take a look at the following two articles on SSH connection sharing:
Basically, do a google search on ssh connection sharing and you'll find a bunch of other articles on it.
Possibly, you could use X forwarding to open multiple remote xterms on your local desktop.
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.
You may also want to look at byobu. It's an enhanced version of Screen and I believe it's a Ubuntu project. But it comes standard with Ubuntu 9.10 and newer.
I tend to still use Screen though by habit but wanted to mention this newer alternative.
If all you're using it for is tailing several files, you may also be interested in multitail.
One unmentioned screen feature is to "detach" screen and it will keep running whatever commands you have running in that set of screens. Once screen is detached, you can logout and it all keeps chugging away even after logging off. I'll startup screen and then do several c commands to create new 'subscreens'. I can switch between them and start some long running compile or data processing and be assured that my crappy VPN connection won' cause everything to die with it.
After logging off, you can log back in and use 'screen -R' which will re-attach you to your existing screen sessoins.