Ssh – Restore SSH session

debiansessionssh

I have connected to my server via SSH and created a process, but suddenly my internet connection got disconnected. I know that the process is going on, but how can restore previous session to see the progress of it?

Best Answer

As suggested above, in the future you can use screen to prevent such thing. A short explanation on how to use screen:

  1. screen -S compiling_stuff
  2. Do stuff here. e.g ./configure
  3. If connection is closed for some reason you can reconnect to the server and issue screen -r comp
  4. You can detach the screen session yourself too by pressing CTRL+A+D

Good luck