используйте chroot для блокирования доступа к sftp без папки, принадлежащей root

Я нашел ответ.

Использование

echo "source /usr/local/gromacs/bin/GMXRC" >> ~/.bashrc

будет работать. Это означает, что добавьте команду source / usr / local / gromacs / bin / GMXRC в ваш ~ / .bashrc. Это заставит каждую новую оболочку автоматически запускать команду

0
23.12.2018, 02:52
1 ответ

man 8 sftp-server, см.:

-d start_directory
         specifies an alternate starting directory for users.  The
         pathname may contain the following tokens that are expanded at
         runtime: %% is replaced by a literal '%', %d is replaced by the
         home directory of the user being authenticated, and %u is
         replaced by the username of that user.  The default is to use the
         user's home directory.  This option is useful in conjunction with
         the sshd_config(5) ChrootDirectory option.
0
28.01.2020, 04:06

Теги

Похожие вопросы