2-7
Before performing the following tasks, you must generate use the client software to generate RSA key
pairs on the client, save the host public key in a file named
pubkey
, and then upload the file to the SSH
server through FTP or TFTP. For details, refer to
Configure the SFTP client (Switch A)
below.
# Import the peer public key from the file
pubkey
.
[SwitchB] public-key peer Switch001 import sshkey pubkey
# For user
client001
, set the service type as SFTP, authentication type as publickey, public key as
Switch001
, and working folder as
flash:/
[SwitchB] ssh user client001 service-type sftp authentication-type publickey assign
publickey Switch001 work-directory flash:/
2) Configure the SFTP client (Switch A)
# Configure an IP address for VLAN interface 1.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address 192.168.0.2 255.255.255.0
[SwitchA-Vlan-interface1] quit
# Generate RSA key pairs.
[SwitchA] public-key local create rsa
# Export the host public key to file
pubkey
.
[SwitchA] public-key local export rsa ssh2 pubkey
[SwitchA] quit
After generating key pairs on a client, you need to transmit the saved public key file to the server
through FTP or TFTP and have the configuration on the server done before continuing configuration of
the client.
# Establish a connection to the remote SFTP server and enter SFTP client view.
<SwitchA> sftp 192.168.0.1 identity-key rsa
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
The Server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:n
sftp-client>
Summary of Contents for S7906E - Switch
Page 82: ...1 4 DeviceA interface tunnel 1 DeviceA Tunnel1 service loopback group 1...
Page 200: ...1 11 DeviceB display vlan dynamic No dynamic vlans exist...
Page 598: ...ii...
Page 1757: ...4 9...
Page 1770: ...6 4...
Page 2017: ...2 11 Figure 2 3 SFTP client interface...
Page 2238: ...1 16 DeviceA cfd linktrace service instance 1 mep 1001 target mep 4002...