When we create a test Linux server or server cluster now, we need to connect to the server we created through the terminal.
The implementation step is divided into 2 steps:
1, generate SSH Key;
2, cover Authorized_keys file
1. Generate SSH Key
We see that some of these column files were generated.
2, cover Authorized_keys file
Because the public key of an SSH key is stored in the Authorized_keys file. If you do not overwrite, you can only use this public key to log in. Do not know the right to understand. Please correct me.
3, the configuration is invalid, or need to enter a password solution
However, many people will not log on after this configuration, and will also require a password, because if the Authorized_keys file, $HOME/.ssh directory or $HOME directory so that users outside the user has write permission, then sshd will refuse to use ~/.ssh/ Authorized_keys the key in the file to authenticate.
Recommended to do the following configuration:
The. SSH folder has permissions set to 700, allowing only the user and root users to have readable, writable, and executable permissions.
. Ssh/authorized_keys is set to allow only readable, writable permissions.
After the above 3 steps of operation, I believe that everyone's server can be a secret login.
The above is a small series to introduce the implementation of the server-free login and exception solutions, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!