How to restrict SSH users to a predefined set of commands after login?

后端 未结 9 1386
灰色年华
灰色年华 2020-11-29 15:28

This is a idea for a security. Our employees shall have access to some commands on a linux server but not all. They shall e.g. have the possibility to access a log file (

9条回答
  •  臣服心动
    2020-11-29 16:03

    What you are looking for is called Restricted Shell. Bash provides such a mode in which users can only execute commands present in their home directories (and they cannot move to other directories), which might be good enough for you.

    I've found this thread to be very illustrative, if a bit dated.

提交回复
热议问题