1-17
If you specify to authenticate a client through public key on the server, the client needs to read the local
private key when logging in to the SFTP server. Since both RSA and DSA are available for public key
authentication, you need to use the
identity-key
key word to specify the algorithms to get correct local
private key; otherwise you will fail to log in. For details, see
SSH Operation Manual
.
Specifying the source interface or source IP address for an SFTP client
You can specify the source interface or source IP address for a switch acting as an FTP client, so that it
can connect to a remote SFTP server.
Follow these steps to specify the source interface or source IP address for an SFTP client:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Specify an interface as the
source interface of the
specified SFTP client
sftp source-interface
interface-type interface-number
Specify an IP address as the
source IP address of the
specified SFTP client
sftp source-ip ip-address
Use either command
Not specified by default.
Display the source IP address
used by the current SFTP client
display sftp source-ip
Optional
Available in any view
SFTP Configuration Example
Network requirements
As shown in
Figure 1-7
, establish an SSH connection between the SFTP client (switch A) and the SFTP
server (switch B). Log in to switch B through switch A to manage and transmit files. An SFTP user with
the username
client001
and password
abc
exists on the SFTP server.
Network diagram
Figure 1-7
Network diagram for SFTP configuration
Configuration procedure
1) Configure the SFTP server (switch B)
# Create key pairs.
<Sysname> system-view
[Sysname] public-key local create rsa