Authoritative guide to SSH password-less Login
[0] Preface
Because SSH implements password-free login, the general steps are as follows:
0.1) The client logs on to the server through ssh;
0.2) The server checks the. ssh file in the home directory and sends the public key file authorized_keys to the client;
0.3) The client receives the public key file from the server, parses it with its own private key file, and calculates the new public key file C;
0.4) The server segment receives the client's public key file C and matches it with its own public key file (it has its own matching algorithm, you don't care about it ), if the match succeeds, the client successfully logs on to the server;
(Attention ):
Here, we have to say that the process of establishing an ssh password-free login is really complicated. Therefore, ssh requires strict access to the configuration file. If you are a friend, you will not be able to establish password-free login Based on the access permissions set in this article, the consequence is at your own risk (Here we only want to emphasize that ssh requires strict access to the configuration file! (Just because the access permission to your configuration file is not completely correct, ssh has never been able to achieve normal password-free login, which is very effort-consuming)
[1] Install ssh
Server installation: sudo yum-y install openssh. i686
Client installation: sudo yum-y install openssh-clients
[2] My task: Hadoop @ hadoop0 (Client) password-free login to hadoop @ hadoop1 (Server)
2.1) generate the private key and public key for creating ssh (client operation)
Attention)
A1 )~ /. Ssh/the directory must have 700 permissions!
A2) One thing to pay special attention to is the archive permission of the id_rsa! He must be-rw ---! Otherwise, in the future key comparison process, it may be determined as dangerous and fail to use the public/private key pair file mechanism to bring it online.
(However, by default, all created files meet the preceding requirements)
2.2) create a. ssh folder in the home directory of the server and set the access permission to 700 (server operation)
2.3) Upload the client's public key file data to the server (client operation)
2.4) change the public key file name under the. ssh folder of the server to authorized_keys, and change the access permission to 600 or 644 (server operation)
2.5) client login to the server without Password
You may also like the following SSH-related articles. For details, refer:
Complete SSH service configuration and troubleshooting in Ubuntu
How to install Samba and SSH server in Ubuntu 14.04
SSH service remote access to Linux Server login is slow
How to Improve the SSH login authentication speed of Ubuntu
Enable the SSH service to allow Android phones to remotely access Ubuntu 14.04
How to add dual authentication for SSH in Linux
Configure the SFTP environment for non-SSH users in Linux
Configure and manage the SSH service on Linux
This article permanently updates the link address: