Home > Operation and Maintenance > Linux Operation and Maintenance > Linux implements password-free login function

Linux implements password-free login function

巴扎黑
Release: 2017-08-22 13:25:45
Original
1938 people have browsed it

1. Host A uses ssh-keygen -t rsa to generate a public key. The public key is in the .ssh folder (cd ~/.ssh) under the current user’s home folder. id_rsa.pub file

2. Execute echo "A's public key" >>authorized_keys in the .ssh file under the corresponding user's home folder on host B, if there is no such file Then create a new one with the address: ~/.ssh/authorized_keys

3. Set the permissions of the public key file and authorized_keys file to 600 (more relaxed permissions are also available, such as 744)

4. A can log in to B without a password.


Special note: The permissions of the authorized_keys file must be 600, otherwise the addition of trust will fail, and machine A cannot directly log in to machine B without a password.

The above is the detailed content of Linux implements password-free login function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template