linux:lshell

This is an old revision of the document!


Restrict SSH Access for User with LShell (Limited Shell)

LShell or Limited Shell is written in python for limiting user for specific set of commands and directories. You can create user environment with limited access, you can also enable disable commands over SSH access.

  • Install on CentOS / RHEL 7:
    # yum update
    # yum install lshell
  • Install on Debian / Ubuntu:
    # apt-get update
    # apt-get install lshell

Now set the LShell as default shell for users for which you are required. For example to change the shell of user sarah.

# chsh sarah

Changing the login shell for sarah
Enter the new value, or press ENTER for the default
	Login Shell [/bin/lshell]: /usr/bin/lshell 

Quelle: https://tecadmin.net/how-to-limit-user-access-with-lshell-limited-shell/#

  • linux/lshell.1510068965.txt.gz
  • Last modified: 2017/11/07 16:36
  • by michael