How to Install and Uninstall restricted-ssh-commands Package on Ubuntu 20.10 (Groovy Gorilla)

Last updated: November 10,2024

1. Install "restricted-ssh-commands" package

This guide covers the steps necessary to install restricted-ssh-commands on Ubuntu 20.10 (Groovy Gorilla)

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

2. Uninstall "restricted-ssh-commands" package

This is a short guide on how to uninstall restricted-ssh-commands on Ubuntu 20.10 (Groovy Gorilla):

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

3. Information about the restricted-ssh-commands package on Ubuntu 20.10 (Groovy Gorilla)

Package: restricted-ssh-commands
Architecture: all
Version: 0.4-1
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Benjamin Drung
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 20
Filename: pool/universe/r/restricted-ssh-commands/restricted-ssh-commands_0.4-1_all.deb
Size: 7372
MD5sum: 80f23401e6ad5e66b7cef8cc6272118a
SHA1: cd97758cbcd9a6f7556804c4060918ca96ee0549
SHA256: 583ccc2f2da1fe0ccf96255de3374747826c92deda3644512fca2049fa65c077
SHA512: c71cd0227c33d3b5134d9ddf9f85cbda8d5967b6354f3a71fbde595114aabd893b3515f78233831da4102a5bab63577a12120891a4a221500877158bdbd1105e
Homepage: https://github.com/bdrung/restricted-ssh-commands
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/lib/restricted-ssh-commands",no-port-forwarding,
no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa [...]
Description-md5: 543b5deaa17e97cd3acbf19774031f2c