Online Learning Academy - LearnAcad.com

... Sharing Knowledge

  • Increase font size
  • Default font size
  • Decrease font size
Home

How to use screen utility to maintain your ssh session without worrying about disconnection

E-mail Print PDF

ubuntuProblem: How to use screen utility to maintain your ssh session without worrying about failures or network disconnection?

 

Solutions:

login via SSH

shaukat@shaukat-desktop:~/cloud-v0.8.5$ screen (press enter)

#it will create a screen session

# start your process work or script. and if want to disconnect without killing ssh session

press CTRL+A and then CTRL+D

# you will be detached from your screen session.

# so now you can easily logout or disconnect without killing your working processes.

Login again via ssh and enter

shaukat@shaukat-desktop:~/cloud-v0.8.5$ screen -r (press enter)

#It will automatically resume your screen session. it is very safe to do the work in background with being worried about disconnection.

#To ee the list of screen session use command screen -ls

shaukat@shaukat-desktop:~/cloud-v0.8.5$ screen -ls
There is a screen on:
        4312.pts-0.shaukat-desktop   (12/25/2013 05:51:17 PM)        (Detached)
1 Socket in /var/run/screen/S-shaukat.

shaukat@shaukat-desktop:~/cloud-v0.8.5$ screen -r

# It will automatically attach your detacched session

 

 

# If you have multiple screen session you can selectively join one of them by


# if for example there are two
123.pts-1
456.pts-2

shaukat@shaukat-desktop:~/cloud-v0.8.5$ screen -dr pts-2

 

Last Updated on Thursday, 26 December 2013 17:18  
Follow us on Twitter

Main Menu

Linux

Islam

Windows

Interview Questions

Database

Internet

Cisco

Entertainment

Networking

Graduate Courses

Psychology

Feed Burner

Subscribe to Welcome to Online Learning Academy by Email

Enter your email address:

Delivered by FeedBurner


Google Groups
Subscribe to LearnAcad
Email:
Visit this group

Login Form