Форум русскоязычного сообщества Ubuntu


Увидели сообщение с непонятной ссылкой, спам, непристойность или оскорбление?
Воспользуйтесь ссылкой «Сообщить модератору» рядом с сообщением!

Автор Тема: как сделать чтобы юзер в SSH которого я создал не мог смотреть папки выше своей  (Прочитано 664 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Joe

  • Автор темы
  • Новичок
  • *
  • Сообщений: 32
  • Eugene Rusakov
    • Просмотр профиля
как сделать чтобы юзер в SSH которого я создал не мог смотреть папки выше своей домашней?
Windows Seven 7600 RTM NT 6.1
Linux  2.6.27-14-generic #1 SMP Mon Aug 31 13:01:41 UTC 2009 i686 GNU/Linux

Оффлайн Mam(O)n

  • Старожил
  • *
  • Сообщений: 5855
    • Просмотр профиля
Тогда в чём смысл юзать SSH? Если нужно просто файлы кидать - юзай ftps (ftp + ssl) с включённым chroot.

Оффлайн SureGOOD

  • Активист
  • *
  • Сообщений: 724
  • suregood.ru
    • Просмотр профиля
    • suregood.ru
а вроде бы можно...хотя с решением не помогу, извините

Оффлайн Mam(O)n

  • Старожил
  • *
  • Сообщений: 5855
    • Просмотр профиля
Можно конечно, но зачем?

Цитата: man sshd_config
    ChrootDirectory
             Specifies a path to chroot(2) to after authentication.  This path, and all its components, must be root-owned
             directories that are not writable by any other user or group.

             The path may contain the following tokens that are expanded at runtime once the connecting user has been
             authenticated: %% is replaced by a literal ’%’, %h is replaced by the home directory of the user being authen‐
             ticated, and %u is replaced by the username of that user.

             The ChrootDirectory must contain the necessary files and directories to support the users’ 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), arandom(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 (see
             Subsystem for details).

             The default is not to chroot(2).

 

Страница сгенерирована за 0.02 секунд. Запросов: 20.