Using screen for SSH connections, re-connecting

Posted on 2007-08-07
Medium Priority
Last Modified: 2013-12-16
I known that a program called screen can be used to somehow re-connect to ssh sessions, can someone please tell me how to use it.

I use ssh over the Internet and often get disconnected I heard that screen can be used, but I do not understand where it need to be run from, the box I am connectin g(sshing) to , or the machien I am running ssh from?

Question by:markpalinux

Accepted Solution

maysara earned 2000 total points
ID: 19649825
screen allows you to keep a session open (ssh or else) even if you loose the connection or the terminal given that you run what ever you want in screen.

what you want to do is the following:

* install screen on the destination (the machine you ssh to)
* connect with ssh to the destination
* start screen
* use the command line just as usually

when you get disconnected:

* reconnect via ssh
* run screen -r , and you will be connected to the session you started earlier is screen

if you have multiple screen running, you can choose to which to reconnect
LVL 15

Author Comment

ID: 19650997

thanks for your help.

I also found

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month17 days, 5 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question