O
O
Ockonal2011-10-15 16:01:25
linux
Ockonal, 2011-10-15 16:01:25

ssh - share specific folder

Hello, you need to set up ssh on the local computer (ArchLinux, openssh installed). For some user 'test', you need to allow access only to a specific folder on the computer. How to do it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Denis, 2011-10-15
@Ockonal

Google sftp - if you just want to transfer files over ssh.
If it is “locked” in the directory, then chroot, but there are nuances here ...

A
ainu, 2011-10-15
@ainu

A chroot is created for this user, and a small world for the user is created there, its own homedir, and the desired folder is already placed there.
The fact is that for any SSH user, the / bin / folder MUST exist in which / bash is located, because the first time you log in, / bin / bash is launched, the user must also see related utilities like iconv, cp (if the implementation is in the form of a binary), php , grep and so on. Without this it will be impossible to work.
Therefore, where the user enters via SSH, there is always a folder /bin, /etc, /dev, /home and so on.
Own / bin, / etc / and other environment for the user takes about a gigabyte (ubunta server).

V
Vlad Zhivotnev, 2011-10-15
@inkvizitor68sl

debian.pro/24 ths .

E
ergil, 2011-10-16
@ergil

openssh has a built in chroot.
news and example

S
smartlight, 2011-10-16
@smartlight

I don't understand these dances.
after all, you can natively chmod to remove access "for the rest" from all folders except the necessary one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question