210
C
15: SSH T
HAPTER
ERMINAL
SFTP Service
SFTP Overview
SFTP Server
Configuration
S
ERVICES
BOTH the private AND public key MUST be in /home/user/ for OpenSSH to work.
result:
[root@localhost openssh-4.2p1]# ./ssh -2 -l 1 -i /home/user/ssh_rsa_key
192.168.0.131
The following sections describe SFTP service.
Secure FTP (SFTP) is a new feature introduced in SSH 2.0.
SFTP is established on SSH connections to secure remote users' login to the switch,
perform file management and file transfer (such as upgrade the system), and provide
secured data transfer. As an SFTP client, it allows you to securely log onto another
device to transfer files.
The following sections describe SFTP server configuration tasks:
Configuring service type for an SSH user
■
Enabling the SFTP server
■
Setting connection timeout time
■
Configuring service type for an SSH user
Table 188 Configure service type for an SSH user
Operation
Enter system view
Configure service type for
an SSH user
Enabling the SFTP server
Table 189 Enable the SFTP server
Operation
Command
Enter system view
system-view
Enable the SFTP server
sftp server enable
Setting connection timeout time
After you set the timeout time for the SFTP user connection, the system will
automatically release the connection when the time is up.
Table 190 Set connection timeout time
Operation
Enter system view
Set timeout time for the SFTP user
connection
Command
system-view
ssh user username service-type {
telnet | sftp | all }
Description
-
Required
By default, the SFTP server is not enabled.
Command
Description
system-view
sftp time-out
Required
time-out-value
By default, the connection timeout time is
10 minutes.
Description
Optional
By default, the SSH service
type is telnet.