Ubuntu – How to have multiple terminal sessions through one single SSH connection

command linessh

I have an Ubuntu server edition running and I can SSH into it to perform various tasks. What I'd like is the ability to SSH into my server kick off a server application and then switch to another "virtual" session (with in the same SSH instance) and run client calls against the service. When I start the service its a blocking call, so I can't run client calls against it without firing up anther SSH session.

I was hoping there might be a slicker way, something like the UI does with virtual desktops.

Best Answer

What you want to use is screen or even better a user-friendly wrapper around screen called byobu.

Screen allows you to run multiple virtual terminal sessions in the same ssh session. A tutorial and help pages are available.

byobu is a wrapper that allows to easily open new screens with a simple function key instead of key combination from ctrl-a. It also shows a status line with all the open virtual terminals which can be named.

Another nice feature is the fact that all your screen can stay up while your ssh connection is disconnected. You just connect again via ssh and call byobu and everything is like before.

At last some screenshots of byobu.

Related Question