T
T
Temp-User_00002020-02-15 21:06:55
SSH
Temp-User_0000, 2020-02-15 21:06:55

What is the problem with users?

It is necessary that the user can NOT rise above the home folder and that he has access ONLY to certain commands. And if there are no problems with the second one (.bashrc to help), then everything is bad with the first one! If ChrootDirectory is included in sshd_config, scp and bash (as well as sh) stop working. I used two instructions ( 1 , 2 ), but none of them helped. Constantly issues

error:
[email protected]:/scripts$ ssh [email protected]
[email protected]'s password:
/bin/bash: No such file or directory
Connection to 0.0.0.0 closed.
[email protected]:/scripts$
How to fix the error, solve all problems and start SSH connection?! Tell me please!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2020-02-16
@CityCat4

Did the most obvious solution come to mind? Copy the required commands (and their accompanying files) to ~/bin? Or somewhere else inside the user's homework?

K
Karpion, 2020-02-16
@Karpion

And what for it is necessary "so that the user could NOT rise above the home folder"? Usually this is done by access rights - let him climb where he wants, he will not be allowed where it is impossible and will not be allowed to change what is supposed to be read only.
What commands should be executed there? Here, too, there are different solutions - for example, many shells do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question