Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Practical tip when remotely updating with SSH
redman
 Posted: Jul 4 2011, 01:17 PM
Quote Post


SLF Admin
********

Group: Admins
Posts: 1410
Member No.: 2
Joined: 8-April 11









When you are remotely updating a machine through SSH, there is always the possibility that the connection is broken.
And depending what you were doing, it can have serious consequences.

Luckily there is a small tool to help you: screen.
This application creates a new instance of bash which will continue to run even when the connection is broken.

For example: login on a remote machine and switch to root. Give the command "screen". The new instance opens with the same useraccount, in this case root. Let the system do something that keep continuing, like "ping google.com" or "top". Now close the window. The connection is broken, but the command still runs. Now when you reconnect and switch to user root, the moment you give the command "screen -r -d" you will be presented with the running instance of screen. Ending it is simple, just give the command "exit".


--------------------
What is SL? - Forum Rules - Info on 3rd Party Repos

Desktop: ASUS P5QPL-AM, Intel Dual-Core E6500, 4GB DDR2, ASUS GeForce GT 430 1GB, SL6.6 x86_64
Build server: HP Proliant ML350 G5, 1x Intel Xeon Quad-Core E5410, 9GB ECC DDR2 FB-DIMM, ASUS GeForce GT 730 1GB, SL6.6 x86_64
PM
^
scottro
 Posted: Jul 4 2011, 01:28 PM
Quote Post


SLF Member
***

Group: Members
Posts: 65
Member No.: 49
Joined: 14-April 11









There is also the newer tmux. I've found that I've come to prefer it. It's a BSD license instead of GPL, if that bothers anyone (but on the other hand, ssh is also a BSD license).

I have a little page on it at http://home.roadrunner.com/~computertaijutsu/screentmux.html that also goes a little more into screen, as well as giving a link to a good cheatsheet for those interested in trying tmux.

PM
^
AndrewSerk
 Posted: Jul 4 2011, 04:08 PM
Quote Post


SLF Moderator
*****

Group: Moderators
Posts: 480
Member No.: 54
Joined: 14-April 11









Great tips guys.
Nice to see you here Scott cool.gif
Andrew
PM
^
lemonzest
 Posted: Jul 4 2011, 09:50 PM
Quote Post


SLF Member
***

Group: Members
Posts: 108
Member No.: 109
Joined: 29-April 11









Gotta go with Scottro on this one, been using tmux for the past few years and its awesome http://dl.dropbox.com/u/2835777/egyptian.gif


--------------------
Desktop: Phenom II X6 1090T Hex-Core (Socket AM3), 16GB RAM, MSI 870-C45, 5x 1TB HDD, Radeon HD 6770 1GB, Mageia 2 x86_64

Test Box:Intel Pentium E2180 (Socket 775), 4GB DDR3, ASRock G41-VS3 2.0, 4x 1TB, 2x 500GB, Onboard GFX, Mageia 2 x86_64

Connection: Virgin Media XL 60Mb/s Down, 3Mb/s Up
PM
^
Jcink
 Posted: Jul 4 2011, 10:23 PM
Quote Post


SLF IRC Team
****

Group: Members
Posts: 167
Member No.: 15
Joined: 10-April 11









This is very useful advice no matter where you are, even if you're on the local network. I don't always use screen, but when I do, any critical commands that I don't want broken go right in there. Has saved me a few headaches.
PMUsers Website
^
avamk
 Posted: Jul 4 2011, 10:29 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 49
Member No.: 127
Joined: 6-May 11









QUOTE (scottro @ Jul 4 2011, 08:28 AM)
There is also the newer tmux.  I've found that I've come to prefer it.  It's a BSD license instead of GPL, if that bothers anyone (but on the other hand, ssh is also a BSD license).
I have a little page on it at http://home.roadrunner.com/~computertaijutsu/screentmux.html that also goes a little more into screen, as well as giving a link to a good cheatsheet for those interested in trying tmux.

Is there a repository that provides tmux? Or do I compile from source? Thanks for pointing this out.
PM
^
lemonzest
 Posted: Jul 4 2011, 11:14 PM
Quote Post


SLF Member
***

Group: Members
Posts: 108
Member No.: 109
Joined: 29-April 11









QUOTE (avamk @ Jul 4 2011, 11:29 PM)
QUOTE (scottro @ Jul 4 2011, 08:28 AM)
There is also the newer tmux.  I've found that I've come to prefer it.  It's a BSD license instead of GPL, if that bothers anyone (but on the other hand, ssh is also a BSD license).
I have a little page on it at http://home.roadrunner.com/~computertaijutsu/screentmux.html that also goes a little more into screen, as well as giving a link to a good cheatsheet for those interested in trying tmux.

Is there a repository that provides tmux? Or do I compile from source? Thanks for pointing this out.



RPMforge (now repoforge)

Has version 1.4.1 I belive http://dl.dropbox.com/u/2835777/egyptian.gif


--------------------
Desktop: Phenom II X6 1090T Hex-Core (Socket AM3), 16GB RAM, MSI 870-C45, 5x 1TB HDD, Radeon HD 6770 1GB, Mageia 2 x86_64

Test Box:Intel Pentium E2180 (Socket 775), 4GB DDR3, ASRock G41-VS3 2.0, 4x 1TB, 2x 500GB, Onboard GFX, Mageia 2 x86_64

Connection: Virgin Media XL 60Mb/s Down, 3Mb/s Up
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll