Linux Screen - Reconnect to Disconnected Session

I quite often use the 'screen' command when i work remotely, mainly to safe guard against losing work from unexpected disconnects.

One of the problems i found though was that when an unexpected disconnect happened, quite often i'd end up with a screen session still attached to a now stale ssh tty, and screen -r would not allow me to reattach to an already attached session, albeit a session attached to a stale/zombie ssh session.

After some googling around, i've found the solution to be using, screen -Dr as oppossed to screen -r ...... essentially it does what ever is nessecary to reconnect to the specified session, or the last session if none is specified.

Saturday 09 August 2014 at 05:12 am | ΒΆ | Linux | No comments