U
U
unixilus2021-02-14 22:53:47
SSH
unixilus, 2021-02-14 22:53:47

How to give access to only one folder when connecting with ssh?

When setting up sftp, how to let users connect to a specific folder? Let's say to configure the same WinScp.


Please do not throw huge articles, I specifically wrote here so that they would answer me here.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-02-14
@unixilus

In the sshd settings, the user needs to register:

ChrootDirectory /home/testuser
ForceCommand internal-sftp

Unfortunately, if you need scp, then there will be more fuss, as I understand it, you need to simulate a full-fledged root from / dev / proc / sys, even if there is only one scp binary in bin ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question