The ssh user sftp-directory command configures the authorized directory of the SFTP service for SSH users.
The undo ssh user sftp-directory command cancels the authorized directory of the SFTP service for the SSH user.
By default, the authorized directory of the SFTP service for the SSH user is hda1:.
| Parameter | Description | Value |
|---|---|---|
username |
Specifies the name of an SSH user. |
The name is a string of 1 to 253 case-insensitive characters without a blank space. |
directoryname |
Specifies the directory name of the SFTP server. |
The name is a string of 1 to 64 case-insensitive characters without a blank space. |
A user can access only the authorized directory of the SFTP service. If the user does not exist, a new SSH user with the specified username is created and the configured authorized directory is adopted. If the configured directory does not exist, the SFTP client fails to connect to the SSH server. After a master/backup switchover or device restart is performed, the SFTP client fails to connect to the SSH server if the configured directory does not exist. In this case, check whether the configured directory is valid. If the configured directory is invalid, re-configure it.