Background: Setting up a Hadoop environment requires no password to log in, so-called no password login actually refers to the way to log in by certificate authentication, using a method called "Public private Key" authentication way to SSH login.
In Linux systems, SSH is the default tool for remote logins because the tool's protocol uses the RSA/DSA encryption algorithm. This tool is very secure for remote management of Linux systems. Telnet, because of its insecurity, is shelved in the Linux system.
"Public Private Key" authentication method Simple Explanation: First create a pair of public private key (public key file: ~/.ssh/id_rsa.pub; private key file: ~/.ssh/id_rsa) on the client. Then put the public key on the server (~/.ssh/authorized_keys) and keep the private key. When using SSH login, the SSH program sends the private key to match the public key on the server. If the match succeeds, you can log in.
Generate secret Key
Installation: OpenSSH rsync
Generate secret key pair: Ssh-keygen-t rsa-p "
File: Id_rsa id_rsa.pub default storage path/HOME/ABCD/.SSH
Append the id_rsa.pub to the authorized key: Cat id_rsa.pub >> Authorized_keys
Modify permissions for an authorized key: Chmod Authorized_keys
To modify an SSH profile: vim/etc/ssh/sshd_config
Remove Comment: rsaauthentication Yes
Pubkeyauthentication Yes
Authorizedkeysfile. Ssh/authorized_keys
Restart Services: Service sshd restart
Test: SSH localhost
2. Sending the public key to the server
SCP ~/.ssh/id_rsa.pub Remote User name @ Remote server ip:~/ ---Copy the public key to the ~/directory of the remote server
SCP ~/.ssh/id_rsa.pub [Email protected]:~/
3. Append the public key to the authorization key
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys --Append public key to authorized key
To be safe, remove the public key
4. Back to client test: SSH 192.168.1.134
SSH password-free login remote server configuration