Use rssh to restrict user access

Use rssh to restrict user access Picture 1 Network Administration - There will be times when you want to provide services that require shell access but do not actually allow users to access this. At this point, the shell is limited, rssh, can be used to solve this situation for you .

At first it seems to be quite contradictory, but there will be times when a system administrator has a legitimate need to provide access-based shell services to users that are indeed normal. Do not allow them this access on the system. Providing shell access to users, especially if they are untrusted users, can be a serious security issue for system administrators.

An example is using OpenSSH to provide SFTP accounts so that users can transfer files to and from secure servers. OpenSSH requires shell access to provide SFTP access. However, we still have a limited shell called rssh that can provide shell access to servers such as OpenSSH but does not provide an interactive shell environment to be abused by user.

The rssh tool is available in the software repository of Unix-like open source systems, such as Debian GNU / Linux and FreeBSD. Debian's apt-cache search command has something to say about it:

rssh - Restricted shell allows only scp, sftp, cvs, rsync and / or rdist

You can find more information about the program at its home page.

After installing it with the original software management tools of the Linux or BSD Unix system, calling and working with the tool is a very simple task. Just create an account that you want to use rssh with your system's standard account creation utilities, then set its default shell to rssh. When this is done, you can test the account's configuration by logging it via ssh. The connection will be closed before login is complete, with a message explaining that the account has been restricted with rssh.

However, for those who want to allow the default account to be able to do something, it will prevent other ways of using the account such as SFTP by default. To allow SFTP, rssh needs to be explicitly configured to do so. Finding the rssh.conf file, its location will depend on the specific system where you installed it, but usually it is still /usr/local/etc/rssh.conf, then edit it to contains the following line, its purpose is to allow SFTP connections:

permissionftp

Similar configuration options are available in other tools that rssh supports, and you can also provide users with access to specific resources on the system without having to provide them. they are able to log in directly with an interactive shell.

3.9 ★ | 8 Vote

May be interested

  • Get familiar with Acccess 2016 interface and basic operationsGet familiar with Acccess 2016 interface and basic operations
    if you have used access 2013 or 2010 you will be familiar with the access 2016 interface: ribbon ribbon and quick access toolbar (providing commands to perform common tasks in access) as well as file menu.
  • How to Hack Into a Windows User Account Using the Net User CommandHow to Hack Into a Windows User Account Using the Net User Command
    if you're administering a computer and need to access another user's account, you can use the 'net user' command to change their password. if you are locked out of your computer, or don't have administrator access, you can use a windows...
  • How to limit access to su command in LinuxHow to limit access to su command in Linux
    if you have added linux to your data center or are just using a single linux machine for your business, you need to make sure it is as secure as possible.
  • Learn about firewalls (Firewall)Learn about firewalls (Firewall)
    if anyone can access your computer at any time, your computer is vulnerable to attack. you can restrict external access to your computer and information thanks to the firewall.
  • How to Encrypt Files in LinuxHow to Encrypt Files in Linux
    you may not want people to see important files on your computer, particularly if it has multiple users. there are several different ways to restrict access to a particular file in the system, but unfortunately, most of them consume a lot...
  • How to Access Other Computers on MacHow to Access Other Computers on Mac
    your macintosh (mac) computer has the ability to access other computers, regardless if the other computers are macs or have windows operating systems. to access other macs, you must edit your user privileges on the network using the...
  • How to block users from accessing drives for security in WindowsHow to block users from accessing drives for security in Windows
    when you don't want other users to access some or all drives, you can use a gpo to quickly restrict access. here are the steps to prevent users from accessing a drive in windows.
  • MS Access 2003 - Lesson 38: Use the AutoCorrect featureMS Access 2003 - Lesson 38: Use the AutoCorrect feature
    if you are a word user (a popular microsoft word processor) you may be very familiar with the autocorrect feature. this tool also adapts to access to help you make more efficient data entry.
  • How to access user activity on LinuxHow to access user activity on Linux
    if you are using a linux server, you can use the following commands to check user activity - when system users log in and frequency of use, which group they belong to, and how much disk space they are currently running. consumption, what command are they running, how much disk space is taking up, ...
  • How to Get Root Rights on UbuntuHow to Get Root Rights on Ubuntu
    to perform administrator tasks on linux, you must have root access (super user or super user). having a separate root account is common on most linux distributions, but ubuntu disables super user permissions by default. this is to prevent you from accidentally causing errors and keep the system safe from suspicious intruders. to execute a command that requires root access, use sudo.