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

后端 未结 9 1374
灰色年华
灰色年华 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 can also restrict keys to permissible commands (in the authorized_keys file).

    I.e. the user would not log in via ssh and then have a restricted set of commands but rather would only be allowed to execute those commands via ssh (e.g. "ssh somehost bin/showlogfile")

提交回复
热议问题