Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I type Ctrl-X X (sic) in screen, the session is locked. What is the default password? Is it the same password which I use to log in to linux?

I ask because: I connect to several different remote linux servers via ssh, under various flavours of linux/unix, and have screen sessions running on all of them. When I lock the screen session and type my password, sometimes it works and on other installations it does not work and I therefore don't know what the password is (so I have to "quit" that screen session externally).

So, what is the default password of screen?

P.S.: I am never root. Version of screen used: Screen version 4.00.03 (FAU) 23-Oct-06

share|improve this question

migrated from Oct 7 '11 at 10:58

This question came from our site for professional and enthusiast programmers.

I expect it depends on whether screen is in a login shell, and whether login is enabled for screen – sehe Oct 7 '11 at 9:45
up vote 6 down vote accepted

The screen password has always been simply the system password of the user running it in my experience. the manpage says that if there's a screen lock program available, it will be used if configured so. So maybe you would need to figure out if this is the case, and how that program behaves.

share|improve this answer
For how to configure a custom lock program, see also – tripleee Jan 22 at 7:27
And what if the user has no password and you use an SSH key to login? – Cerin Jan 27 at 0:40
I think then the user should not lock his screen; he might not be able to login again afterwards... – jpjacobs Jan 30 at 9:55
@jpjacobs: Alas, It's not always the user's choice:… – deltab Feb 5 at 14:28

I sometimes find myself in the same situation, on servers where I have SSH public-key login and thus no password at all (that I know), and struggle to remember what I did last time to recover.

There is no need to kill the screen. Just disconnect the terminal you are running screen in, then open a new terminal window and reattach (screen -r).

Maybe as a precaution, add bind x to your .screenrc so that the lock keystroke is unbound. In an already running screen, use ctrl-A : bind x.

share|improve this answer
Ah, simple but perfect - thanks! – Leonard Challis Jul 9 '15 at 11:53

the password of the user that owns the screen process.

share|improve this answer
What do you do when there is no password? I use a passwordless SSH key to login to my server and screen still asks me for a password... – Cleber Goncalves Feb 27 '14 at 8:19
using a phrase-less ssh key (bad idea btw, look into ssh-agent) isn't the same as having no password. screen will want whatever the users password is on the remote system in /etc/shadow – Sirex Feb 27 '14 at 17:37

You must log in to answer this question.

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