The so-called key is the private key placed on their own computer, the public key on the host, can be connected through the private key, more security.
mkdir/root/. SSH is created inside root. SSH This directory because of Add. You can hide the directory so ls/root/is not able to see the directory
Need to add a ls-a/root/to see
and then again. SSH This directory to create a file Authorized_keys
vi/root/. Ssh/authorized_keys
Copy and paste the generated public key inside
and copy the private key to putty.
Also need to change the startup permissions, limited with the key to start
chmod 700/root/. Ssh
chmod 600/root/. Ssh/authorized_keys
Shutting down the firewall
Otherwise, the key cannot be successful.
There are two types of firewalls, the SELinux Netfiltter is also called (iptobles)
Setenforce 00 off requires a permanent shutdown to edit its configuration.
Vi/etc/selinux/config
Changing the selinux=enforcing to disabled requires a reboot to take effect.
Iptobles-f temporarily closed
Service Iptobles Save purge rule is permanently closed.
Xshell and Putty almost
Create new user key Generation wizard
Save the file to prevent you from forgetting it later
Both Xshell and putty are the same principle.
The steps are all in this step.
Putty and Xshell Key login