0

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?

vrbadev
  • 101
  • 1
    Do these users login locally, too? And if so, shall screen not be started in this case? – Hauke Laging Apr 17 '13 at 08: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 09:56

1 Answers1

0

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

unbindall
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.

Tobu
  • 6,593