The sftp server enable command enables the SFTP service on the SSH server.
The undo sftp server enable command disables the SFTP service on the SSH server.
By default, the SFTP service is disabled.
Parameter | Description | Value |
---|---|---|
ipv4 | Indicates that the SFTP IPv4 service is enabled on the SSH server. | - |
ipv6 | Indicates that the SFTP IPv6 service is enabled on the SSH server. | - |
Usage Scenario
To connect the client to the SSH server to transfer files in SFTP mode, you must first enable the SFTP server on the SSH server.
Precautions
After the sftp server enable command is run, the device receives login connection requests from all interfaces by default. Therefore, there are security risks. You are advised to run the ssh server-source command to specify the source interface of the SFTP server.
After the sftp server enable command is run, the numbers of IPv4 port and IPv6 port are both changed. To change the number of IPv4 port or IPv6 port separately, run the sftp [ ipv4 | ipv6 ] server enable command.
# Enable the SFTP service.
<HUAWEI> system-view [HUAWEI] sftp server enable Info: Succeeded in starting the SFTP server.
# Disable the SFTP service.
<HUAWEI> system-view [HUAWEI] undo sftp server enable Info: Succeeded in closing the SFTP server.
# Enable the SFTP IPv4 service.
<HUAWEI> system-view [HUAWEI] sftp ipv4 server enable