using ssh+ Password Authentication (basic SSH configuration method)Note: When a user logs on to a switch using SSH, the switch authenticates the user who is logged on by using a passwordgenerate RSA and DSA key pair
[H3c]public-key Local create RSA [H3c]public-key Local Create DSA Set the authentication mode on the user interface to AAA and let the user interface support SSH protocol
[h3c]user-interface vty 0 4 [h3c-ui-vty0-4]authentication-mode scheme [ H3c-ui-vty0-4]protocol Inbound SSH Create user Luwenju-juzi, set authentication password to [email protected]# login protocol is SSH, can access command level 3
[H3c]local-user Luwenju-juzi [ H3c-luser-luwenju-juzi]password cipher [email protected]# [H3c-luser-luwenju-juzi]service-type ssh level 3 Specify user Luwenju-juzi authentication method password
[h3c]ssh user luwenju-juzi authentication-type password A basic SSH configuration is over, and you can use the SSH login tool to connect the switch after the configuration is complete.
using ssh+ key, password Authentication (advanced SSH configuration method)Note: When the client logs on to the switch using the SSH tool, the switch uses both a key and a password to authenticate the user to be logged onGenerating RSA and DSA key pairs
[H3c]public-key Local create RSA [H3c]public-key Local Create DSASet the authentication mode on the user interface to AAA authentication, and open the SSH protocol on the interface, and set the command level that the user can access to 3[
h3c]user-interface vty 0 4 [h3c-ui-vty0-4]authentication-mode scheme [H3c-ui-vty0-4]protocol inbound SSH [ H3c-ui-vty0-4]user Privilege Level 3 Create user, and specify authentication method for public key authentication, username is Luwenju-juzi, password is [email protected]#
[H3c]local-user luwenju-juzi [h3c-luser-luwenju-juzi]password cipher [Email protected]# [ H3c-luser-luwenju-juzi]service-type ssh Level 3 [h3c]ssh user Luwenju-juzi Authentication-type password-publickey The client generates public and private keys with Puttygen.exe to generate a public private key pair, and then put it into a folder, where we generate the public key called Luwenjukey private key is LUWENJU.PPK, and then we upload the public key file Luwenjukey to the FTP server, Then log in to the switch and download the Luwenjukey to the switch
[Ftp]get LuwenjukeyGenerate a public key for the user, import the client's public key in the file Luwenjukey on the switch, the public key name is Luwenju-juzikey Note: Luwenju-juzikey is the public key generated for the user
[H3c]public-key peer luwenju-juzikey import sshkey luwenjukey Specify the public key for user Luwenju-juzi Luwenju-juzikey
[h3c]ssh User Luwenju-juzi assign PublicKey luwenju-juzikeyThen open the SSH login tool, import the private key LUWENJU.PPK, then enter the IP address of the switch to login
H3C switch SSH configuration full raiders---Reprint