first Open Xshell, "Tools"-->> "New user key Generation Wizard"650 this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/8D/14/ Wkiol1ifwcoqi9fwaaa5vyqrfai530.jpg-wh_500x0-wm_3-wmp_4-s_61704124.jpg "style=" Float:none; "title=" 1 "alt=" Wkiol1ifwcoqi9fwaaa5vyqrfai530.jpg-wh_50 "/>
Select key Type "RSA", key length,
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8D/17/wKiom1iFwcTAzqalAACLXSYe8kg984.jpg-wh_500x0-wm_3 -wmp_4-s_1507375483.jpg "style=" Float:none; "title=" 2 "alt=" Wkiom1ifwctazqalaaclxsye8kg984.jpg-wh_50 "/>
Enter the name of the key, set the key encryption password (can make the key more secure)
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8D/14/wKioL1iFwcTDdpRWAAB3d7veNsM908.jpg-wh_500x0-wm_3 -wmp_4-s_2945121311.jpg "style=" Float:none; "title=" 3 "alt=" Wkiol1ifwctddprwaab3d7vensm908.jpg-wh_50 "/>
The format of the key "OpenSSH", saved to the local host
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8D/14/wKioL1iFwcWDzFKWAACnG3PEdso713.jpg-wh_500x0-wm_3 -wmp_4-s_1964176774.jpg "style=" Float:none; "title=" 4 "alt=" Wkiol1ifwcwdzfkwaacng3pedso713.jpg-wh_50 "/>
Connect to the Linux client, go to the home directory of the user to log in to the remote key, enter the ~/.SSH directory (if no one can be created, its permission is 700), use the RZ command to upload the password file on the local host to the ~/.SSH directory of the Linux client, The modified file name is Authorized_keys, and its permissions are
Next, set the configuration file/etc/ssh/sshd_config for the sshd service,
Rsaauthentication Yes
Pubkeyauthentication Yes
Usepam Yes
Challengeresponseauthentication No
Test Xshell
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8D/17/wKiom1iFxP3hbuzKAAAz9VAoj5U636.jpg-wh_500x0-wm_3 -wmp_4-s_828555694.jpg "title=" 5.jpg "alt=" Wkiom1ifxp3hbuzkaaaz9vaoj5u636.jpg-wh_50 "/>
Determine the user name to log in, select public key mode login, select the user key, enter the key encryption password;
The test can log in normally can be in the configuration file/etc/ssh/sshd_config, prohibit password login
Passwordauthentication no//No key login is not a big point.
If you want to disable log on as root user,
Permitrootlogin No
These are the learning experience, deficiencies, please correct me!
SSH to RHEL7 using Xshell via public key