Keep ssh session saved (Unix “screen” utility)

Unix screen utility is very useful when you’re managing remote unix server by means of ssh. This utility allows to save session opened and come back to it after being disconnected…
Let me describe the certain situation: you’ve started dump/restore backup operation for full filesystem mirroring to another hard drive remotely by ssh. It works fine and more than 50% is completed but after power outage or your internet supplier issue you’ve been disconnected from ssh session. As the result backup/restore operation is stopped and it’s necessary to start it again.

To prevent this just start ‘screen’ utility and run needed command after this. In case of disconnection you’ll need to type ‘screen -r’ (-r means restore) and come back to operations you were performing before being disconnected.

This utility is rather powerful and besides allows to create several virtual windows and switch between them by means of hot keys.

Here are some of useful hot keys:

CTRL-a c Create a new window
CTRL-a spacebar Go to next window
CTRL-a backspace or del Go to previous window
CTRL-a 2 Go to window 2
CTRL-a w list windows


1 Response to “Keep ssh session saved (Unix “screen” utility)”

  1. 1 Moving Linux to remote server (over ssh via third server) « Linux Screw Trackback on August 21, 2007 at 9:54 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: