190
Configuring SFTP
SFTP is a new feature in SSH2.0.
SFTP uses the SSH connection to provide secure data transfer. The switch can serve as the SFTP server,
allowing a remote user to log in to the SFTP server for secure file management and transfer. The switch
can also serve as an SFTP client, enabling a user to log in from the switch to a remote device for secure
file transfer.
Configuring the switch as an SFTP server
Configuration prerequisites
Before you configure this task, complete the following tasks:
1.
Configure the SSH server.
2.
Use the
ssh user service-type
command to set the service type of SSH users to
sftp
or
all
.
For more information about the configuration procedures, see "
."
Enabling the SFTP server
Enables the SFTP server so that a client can log in to the SFTP server through SFTP.
To enable the SFTP server:
To do…
Use the command…
Remarks
1.
Enter system view.
system-view
—
2.
Enable the SFTP server.
sftp server enable
Required
Disabled by default
When the switch functions as the SFTP server, only one client can access the SFTP server at a time. If the
SFTP client uses WinSCP, a file on the server cannot be modified directly; it can only be downloaded to
a local place, modified, and then uploaded to the server.
Configuring the SFTP connection idle timeout period
Once the idle period of an SFTP connection exceeds the specified threshold, the system automatically
tears the connection down.
To configure the SFTP connection idle timeout period:
To do…
Use the command…
Remarks
1.
Enter system view.
system-view
—
2.
Configure the SFTP
connection idle timeout
period.
sftp server idle-timeout
time-out-
value
Optional
10 minutes by default