Detailed Implementation of password-free logon tutorials and Linux tutorials in linux
How to Implement password-free logon in Linux
This article mainly introduces information about password-free logon in Linux. It is very good and has reference value. If you are interested, let's take a look.
1. Generate a key in Linux
For the command manual of ssh-keygen, run the "man ssh-keygen" command:
Run "ssh-keygen-t rsa"
A ". ssh" folder is generated in the root directory of the user.
Entering ". ssh" will generate the following files:
Authorized_keys: stores the public key for remote password-free logon. This file records the public keys of multiple machines.
Id_rsa: generated private key file
Id_rsa.pub: generated public key file
Know_hosts: list of known host public keys
If you want the ssh public key to take effect, you must meet at least the following two conditions:
1) the ssh directory permission must be 700
2). The ssh/authorized_keys File Permission must be 600