Answer the question
In order to leave comments, you need to log in
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
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.
In the user's home folder, add aliases of unnecessary commands to the true command in .bashrc
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 questionAsk a Question
731 491 924 answers to any question