User Tools

Site Tools


howtos:persistent_ssh_-_ssh_with_screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:persistent_ssh_-_ssh_with_screen [d/m/Y H:i] (current)
Line 1: Line 1:
 +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.
 +
 +<​file>​
 +ssh() {
 +  if [[ "​$2"​ == ""​ ]]; then
 +    command ssh "​$1"​ -Xt screen -aAdr -RR work bash
 +  else
 +    command ssh $@
 +  fi
 +}
 +</​file>​
 +
 +----
 +
 +----
 +Source:​http://​profarius.com/​content/​persistent-ssh
  
howtos/persistent_ssh_-_ssh_with_screen.txt · Last modified: d/m/Y H:i (external edit)