< Home

sftp server enable

Function

The sftp server enable command enables the SFTP service on the SSH server.

The undo sftp server enable command disables the SFTP service from the SSH server.

By default, the SFTP service is disabled on the SSH server.

Format

sftp [ ipv4 | ipv6 ] server enable

undo sftp [ ipv4 | ipv6 ] server enable

Parameters

Parameter Description Value
ipv4 Indicates that the IPv4 SFTP service is enabled on the SSH server. -
ipv6 Indicates that the IPv6 SFTP service is enabled on the SSH server. -

Views

System view

Default Level

3: Management level

Usage Guidelines

The client can connect to the SSH server through SFTP only after the SFTP service is enabled on the SSH server.

  • After you run the sftp server enable command to enable the SFTP service on the SSH server, the SSH monitoring port is enabled to listen for IPv4 and IPv6 protocol packets. To enable listening for IPv4 or IPv6 protocol packets separately, run the sftp { ipv4 | ipv6 } server enable command.
  • After you run the undo sftp server enable command to disable the SFTP service on the SSH server, the SSH monitoring port is disabled from listening for IPv4 and IPv6 protocol packets. To disable listening for IPv4 or IPv6 protocol packets separately, run the undo sftp { ipv4 | ipv6 } server enable command.

Precautions

After the sftp server enable command is run, the system listens to IP address 0.0.0.0 by default. That is, the system listens to all IP addresses, which is prone to security issues. In this case, you are advised to run the ssh server-source command to specify a listening source for the SFTP server.

Example

# Enable the SFTP service.

<sysname> system-view
[sysname] sftp server enable

# Disable the SFTP service.

<sysname> system-view
[sysname] undo sftp server enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >