Put this into ~/.bashrc then everytime you ssh to a host it will startup a screen session or resume one. This way you will not loss work when connection is broken.

ssh() {
  if [[ "$2" == "" ]]; then
    command ssh "$1" -Xt screen -aAdr -RR work bash
  else
    command ssh $@
  fi
}


Source:http://profarius.com/content/persistent-ssh

indexes/persistent_ssh_-_ssh_with_screen.txt · Last modified: 2010/09/19 11:57 by domingo
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki