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

后端 未结 9 1389
灰色年华
灰色年华 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:04

    You should acquire `rssh', the restricted shell

    You can follow the restriction guides mentioned above, they're all rather self-explanatory, and simple to follow. Understand the terms `chroot jail', and how to effectively implement sshd/terminal configurations, and so on.

    Being as most of your users access your terminals via sshd, you should also probably look into sshd_conifg, the SSH daemon configuration file, to apply certain restrictions via SSH. Be careful, however. Understand properly what you try to implement, for the ramifications of incorrect configurations are probably rather dire.

提交回复
热议问题