N
N
Nikname_non_name2019-08-29 08:00:22
SSH
Nikname_non_name, 2019-08-29 08:00:22

We continue to pick SSH?

Hello!
There is a need (so as not to write: why sorry) to limit some SSH commands. How to do this?! Please help without ok google please!
Thanks in advance for your replies!!!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Shitskov, 2019-08-29
@Zarom

One option is to use a restrictive shell - rbash, for example
https://m.habr.com/ru/post/437710/
But you can leave it if you wish.

A
Armenian Radio, 2019-08-29
@gbg

In the user's home folder, add aliases of unnecessary commands to the true command in .bashrc

C
CityCat4, 2019-08-29
@CityCat4

Well, there are some system commands? There are several ways:
- If the binary is in / sbin, / usr / sbin - just exclude these paths from the PATH in the user's .bashrc
- If the binary is in / bin, / usr/bin - you can create a folder / bin in the user's homepage, put it there dummies (links with true for example) and put it first in PATH
- Give the user a different shell, not bash :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question