D
D
Dima Kim2016-03-31 06:44:18
linux
Dima Kim, 2016-03-31 06:44:18

How can I make the user see nothing but /home/%username%?

How can I make the user see nothing but /home/%username%?
usually in the desktop version of the OS, if you sit through the GUI, then only the user's working directory is displayed, and in the Server version, if you create a regular user and log in via ssh, it sees all directories and can read. Question: how can I make the user see nothing but /home/%username% when logging in via ssh?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
O. J, 2016-03-31
@jalpy

If only for ssh, then you can decide at the ssh server level.
Write a line in sshd.conf
ChrootDirectory %h

A
alegzz, 2016-03-31
@alegzz

chroot

S
Sanes, 2016-03-31
@Sanes

I am using lhell. Not only the directory limits, but also the set of allowed commands.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question