2

Two Things. I'm trying to setup multiple server applications on Ubuntu With Terminal using SSH.

  1. I need to be able to use some form of login to the applications VNC, (having trouble with) SSH GREAT, but even if I close the connection I cannot connect back to the server Terminal application. So how do I access the Terminals from a re-login with SSH? (or any other suggestions)
  2. How do I run multiple terminals on a single SSH connection?

In conclusion, I want to use SSH (or some other thing) to connect to multiple Terminal applications (already running) to have Console access for the servers or file management.

4

Use a terminal multiplexer.

A good one to use that's easy to learn is screen. You can get it by:

sudo apt-get install screen

To create a new screen session:

screen -S somename

This will spawn a new session with your default shell. To detach, press ctrl+a followed by d.

To list current screen sessions:

screen -ls

To re-attach to a detached session:

screen -r somename

To create a "multi-user" screen session so that more than one person can view and type in the session:

screen -m -S shared

To join a multi-user session:

screen -X shared

To terminate a screen a session, you can either:

kill PID (found with screen -ls)

or while the screen is attached ctrl+d

  • Does Screen allow you to run multiple Terminals disconnect from them, and come back and access all of them again? Thanks, Landon – Landon Jan 29 '16 at 6:22
  • That's exactly what it is designed for! Create a screen session, start working, detach, log-off, log back in, reattach, continue working. – user323419 Jan 29 '16 at 6:23
  • Great, I'll try that. – Landon Jan 29 '16 at 6:38
  • Remember, if this answer helped you, you can click the grey "checkmark" next to this answer to make it green, meaning "Yes! This solved my problem!" – user323419 Jan 30 '16 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.