5

So here's what happened:

  • I ssh to the server with a normal user
  • I run sudo -i
  • I run screen

Then I accidentally locked the screen session. to unlock it, it asks for root's password not the password of the normal user. The problem is I don't know the password of root. What can I do in this case?

1 Answer 1

10

You can attach to the session from "another terminal" (including another ssh connection). That lets you recover anything that was in progress. You can always kill the screen session as you started it, by using sudo to kill the parent process of the screen session (the one named "screen").

The feature only is useful if it is properly configured to begin with (usually that is not the case).

Further reading:

1
  • I tried to detach it but it didn't work. does screen really allow you to detach once locked? Commented Feb 11, 2016 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .