The sftp server default-directory command configures a default authorized SFTP server directory.
The undo sftp server default-directory command cancels the configuration of the default authorized SFTP server directory.
By default, no authorized SFTP server directory is available.
Usage Scenario
When accessing the server through SFTP, you can access only the authorized directory on the SFTP server. You can use any of the following methods to configure the authorized directory. The priorities of the three methods are as follows in descending order:
The ssh user <user-name> sftp-directory <sftp-dir-path> command has the highest priority and takes effect only for specified SSH users. The sftp server default-directory command has the lowest priority and takes effect for all SSH users.
This command takes effect for both ipv4 and ipv6 SFTP servers.