In the Xshell client, select the new user Key Generation Wizard in the tool's options
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/97/25/wKiom1kpS8mzzG7gAADRz122cfI321.png-wh_500x0-wm_ 3-wmp_4-s_85934686.png "title=" 21.png "alt=" Wkiom1kps8mzzg7gaadrz122cfi321.png-wh_50 "/>
The secret key to the default is the type of RSA, the key length of the default is 2048, the longer the more difficult to crack. In general, 2048 is enough.
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/97/26/wKioL1kpS9uzzXznAACzsvB2xks574.png-wh_500x0-wm_ 3-wmp_4-s_329618885.png "title=" 22.png "alt=" Wkiol1kps9uzzxznaaczsvb2xks574.png-wh_50 "/>
Generate Public key
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/97/25/wKiom1kpS-vg-7YeAACpkq5-x_w516.png-wh_500x0-wm_ 3-wmp_4-s_4117977767.png "title=" 23.png "alt=" Wkiom1kps-vg-7yeaacpkq5-x_w516.png-wh_50 "/>
This way to fill in the key name can be filled out, enter the user secret key password
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/97/25/wKiom1kpS_qCU5SMAACs-HYKeaE722.png-wh_500x0-wm_ 3-wmp_4-s_2315232791.png "title=" 24.png "alt=" Wkiom1kps_qcu5smaacs-hykeae722.png-wh_50 "/>
This is the generated public key.
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/97/25/wKiom1kpTPKCLD4uAADkTaFlM9U310.png-wh_500x0-wm_ 3-wmp_4-s_1126453986.png "title=" 1111.png "alt=" Wkiom1kptpkcld4uaadktaflm9u310.png-wh_50 "/>
Save the public key file to the specified file directory in case you forget it later.
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/97/26/wKioL1kpTVzh4SH0AAE_PYfZZuY822.png-wh_500x0-wm_ 3-wmp_4-s_667465050.png "title=" 1212.png "alt=" Wkiol1kptvzh4sh0aae_pyfzzuy822.png-wh_50 "/>
To the CentOS terminal, configure the following:
Mkdir/root/.ssh
chmod 700/root/.ssh/
Vim/root/.ssh/authorized_keys This file didn't need to be written by itself .
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/97/25/wKiom1kpTYmDaC6gAADgfUcrHKE086.png-wh_500x0-wm_ 3-wmp_4-s_3071683117.png "title=" 26.png "alt=" Wkiom1kptymdac6gaadgfucrhke086.png-wh_50 "/>
Open a new configuration key pair
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/97/26/wKioL1kpTaqQG73OAAB66IxlFGs861.png-wh_500x0-wm_ 3-wmp_4-s_2440391238.png "title=" 27.png "alt=" Wkiol1kptaqqg73oaab66ixlfgs861.png-wh_50 "/>
Select the relative Host Selection property
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/97/25/wKiom1kpTb6iH2P8AACelinsvLc022.png-wh_500x0-wm_ 3-wmp_4-s_2461101757.png "title=" 28.png "alt=" Wkiom1kptb6ih2p8aacelinsvlc022.png-wh_50 "/>
Select the appropriate method, user key, and password for the user identity authentication.
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/97/26/wKioL1kpTdiiWA8LAAC3uG8aLlo846.png-wh_500x0-wm_ 3-wmp_4-s_1486916599.png "title=" 29.png "alt=" Wkiol1kptdiiwa8laac3ug8allo846.png-wh_50 "/>
Reconnect will be able to log in, do not need to enter the user name and password
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/97/26/wKioL1kpTfiBFLaAAAEMfOv_DBk261.png-wh_500x0-wm_ 3-wmp_4-s_2054151067.png "title=" 30.png "alt=" Wkiol1kptfibflaaaaemfov_dbk261.png-wh_50 "/>
This article from "Huazi" blog, declined reprint!
Xshell secret key