Команды, выполненные, когда терминал открыт, не появляются в истории

В sshd_config файл, который является тем, что строит sftp сооружения, можно сделать следующее:

AllowGroups sftponly

Match Group sftponly
    ChrootDirectory /webdocs/ABC
    ForceCommand internal-sftp
    X11Forwarding no
    AllowTcpForwarding no
    PasswordAuthentication yes

Я не полагаю, что это сделает подстановочные знаки все же. Таким образом, необходимо будет создать отдельные экземпляры этих правил в файле.

ChrootDirectory

выборка от sshd конфигурирует страницу справочника

$ man sshd_config
...
 ChrootDirectory
         Specifies the pathname of a directory to chroot(2) to after 
         authentication.  All components of the pathname must be root-owned 
         directories that are not writable by any other user or group.  
         After the chroot, sshd(8) changes the working directory to the 
         user's home directory.

         The pathname 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 authenticated, and %u is replaced by the username
         of that user.

         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), arandom(4) and tty(4) devices.  For file transfer 
         sessions using “sftp”, no additional configuration of the 
         environment is necessary if the inprocess sftp server is used, 
         though sessions which use logging do require /dev/log inside the 
         chroot directory (see sftp-server(8)
         for details).
2
13.04.2017, 15:36
1 ответ
[1173325] Вы можете сделать что-нибудь вроде:[12138] (здесь, используя [1173758]vi /etc/issue[1173759] в качестве вашей команды). [12139] У этого есть преимущество запуска [1173760]$CMD[1173761] в качестве задания этой оболочки, поэтому вы можете приостановить ее возобновление, прервать как другие задания, и это может повлиять на окружение оболочки (например, вы можете сделать [1173762]CMD='PATH=$foo:$PATH'[1173763]). [12140]Предполагается, что ваш [1173764]~/.bashrc[1173765] сам по себе не устанавливает [1173766]$PROMPT_COMMAND[1173767].[12141]Правка:[12142]Для нескольких вкладок:[12143]
3
27.01.2020, 22:06

Теги

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