Configuring an Authorized SFTP Server Directory

This topic describes how to configure an authorized SFTP server directory for SSH users.

Context

If the ssh user username sftp-directory directoryname command is run but username specified in the command does not exist, an SSH user named username is created, and the authorized SFTP server directory is set to the configured directory. If no authorized SFTP server directory is configured, you can run the local-user user-name ftp-directory directory command to use the FTP server directory. If none of the authorized SFTP server directory, authorized FTP server directory, and the default authorized directory exist, the SFTP client fails to connect to the SSH server.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Configure an authorized SFTP server directory for SSH users as required.

    • Run the ssh user user-name sftp-directory directoryname command to configure an authorized SFTP server directory for a specified SSH user.
    • Run the sftp server default-directory sftpdir command to configure a default authorized SFTP server directory.
    • Of the two preceding commands, the ssh user username sftp-directory directoryname command has a higher priority but takes effect only for a specified SSH user.
    • Of the two preceding commands, the sftp server default-directory sftpdir command has a lower priority but takes effect for all SSH users.

  3. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >