How to Install and Uninstall restricted-ssh-commands Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 05,2024

1. Install "restricted-ssh-commands" package

In this section, we are going to explain the necessary steps to install restricted-ssh-commands on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install restricted-ssh-commands

2. Uninstall "restricted-ssh-commands" package

Please follow the instructions below to uninstall restricted-ssh-commands on Ubuntu 16.04 LTS (Xenial Xerus):

$ sudo apt remove restricted-ssh-commands $ sudo apt autoclean && sudo apt autoremove

3. Information about the restricted-ssh-commands package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: restricted-ssh-commands
Priority: optional
Section: universe/net
Installed-Size: 19
Maintainer: Ubuntu Developers
Original-Maintainer: Benjamin Drung
Architecture: amd64
Version: 0.3-1
Filename: pool/universe/r/restricted-ssh-commands/restricted-ssh-commands_0.3-1_amd64.deb
Size: 6684
MD5sum: 8b73607a7de61d2f8e558807d18b3f77
SHA1: 88d5948f668b450a3198982f71bf2f8a6f9583e1
SHA256: 0b716e17aa6ec0c66afcb4d6c7125f0776cddc7f6ca7d6b2d8999ffe26730ef7
Description-en: Restrict SSH users to a predefined set of commands
restricted-ssh-commands is intended to be called by SSH to restrict a
user to only run specific commands. A list of allowed regular
expressions can be configured in /etc/restricted-ssh-commands/. The
requested command has to match at least one regular expression.
Otherwise it will be rejected.
.
restricted-ssh-commands is useful to grant restricted access via SSH to
do certain task. For example, it could allow a user to upload a Debian
packages via scp and run reprepro processincoming.
.
Create a configuration file in /etc/restricted-ssh-commands/ and add
following line to ~/.ssh/authorized_keys to use it
.
command="/usr/bin/restricted-ssh-commands",no-port-forwarding,
no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [...]
Description-md5: aa183cac9ee7ed24aedd39d084e90e02
Homepage: https://github.com/bdrung/restricted-ssh-commands
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu