one, the need for key login
In general, the key login ssh is more secure than the account password login, and sometimes the company needs to configure the server login for the new colleague, typically by configuring the key login directly. second, SSH key login step 1, the key generation
There are generally many ways to generate keys. Here, we use Ssh-genkey on the positive server to generate the key, using the Puttygen of the client to convert the method.
The following figure:
Where-T is the means of encryption. Then modify the public key name to Authorized_keys.
Also, make sure that the. SSH directory has permissions of 600, if it is not, use chmod ssh to set it up. The main purpose is to prevent others from placing a public key under. SSH, you can log in without password.
Then, use the PSCP to load the private key into the native, and convert it with Puttygen. 2, login settings
As shown in the figure:
3, after the successful login as shown
Iii. Frequently asked questions. Question one: server refused our key.
Cause: If you look at the log, you know. The SSH context is not secure and is intercepted by SELinux.
Solution: RESTORECON-RV. SSH, login after successful execution. problem two: Only root user can log in, other users can not log in.
Cause analysis: Generally because it is not set in the appropriate directory. SSH
Solution:/root/.ssh/This directory is set to the root account public key. The corresponding user A, to the/HOME/A/.SSH under the same settings as root.
After the success of the following figure:
Affirm: This article original, if reprint please indicate the original address.
http://blog.csdn.net/q229827701/article/details/41683959