376
<RouterA> ssh2 192.168.1.40
Username: client002
Trying 192.168.1.40 ...
Press CTRL+K to abort
Connected to 192.168.1.40 ...
The Server is not authenticated. Continue? [Y/N]:y
Do you want to save the server public key? [Y/N]:n
Then, you can log in to Router B successfully.
SFTP configuration examples
This section provides examples of configuring SFTP.
Password authentication enabled SFTP server configuration
example
Network requirements
As shown in Figure 127, you can log in to the router through the SFTP client that runs on the host.
The router acts as the SFTP server and uses password authentication. The username and password
of the client are saved on the router.
Figure 127 Network diagram
Configuration procedure
1. Configure the SFTP server:
# Generate the RSA key pairs.
<Router> system-view
[Router] public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++++
++++++++++++++
+++++
++++++++
# Generate a DSA key pair.
[Router] public-key local create dsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,