Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

When a user logins to my Debian server using e.g. Putty, I need to perform the following:

  1. It will automatically execute command screen -r MyWindow, and
  2. the user won't be able to leave the screen window, so I want the user to have disabled all commands.

How can I do that?

share|improve this question

marked as duplicate by jasonwryan, vonbrand, Thor, manatwork, rahmu Apr 17 '13 at 11:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Do these users login locally, too? And if so, shall screen not be started in this case? –  Hauke Laging Apr 17 '13 at 8:46
You need give a much better description of your problem! 1. you can tie users only to sessions, not windows. 2. Without recompiling screen, you cannot prevent a user from issuing commands. –  Bananguin Apr 17 '13 at 9:56

1 Answer 1

Here is a screenrc that disables interactive commands (it may not be tamper-proof).

escape ""
defescape ""
shell /bin/false

Use it to start your screen server. Then attach to the same screen server on login, using an SSH forced command.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.