Answer the question
In order to leave comments, you need to log in
Ubuntu 14.04. How to restrict ssh user movement to his home directory, and better not to his home directory but to another one?
Hello.
There are 2 hostings, from one to the other you need to download the file via ssh via php.
Is it possible to prevent a specific user from leaving the specified directory?
These recipes didn't help.
Answer the question
In order to leave comments, you need to log in
In sshd_config:
Match User someuser
ChrootDirectory /some/directory
The ChrootDirectory must contain the necessary files and directories to support the user's session. For an interactive session this requires at least a shell, typically sh(1), and basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4), and tty(4) devices. For file transfer sessions using ``sftp'', no additional configuration of the environment is necessary if the in-process sftp server is used, though sessions which use logging may require /dev/log inside the chroot directory on some operating systems (see sftp-server(8) for details).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question