SSH passwordless login configuration (mainly for Hadoop configuration)

SSH passwordless login configuration (mainly for Hadoop configuration)
1. Modify the content of the [/etc/ssh/sshd_config] file on the server side (release the following three configuration items in the configuration file)
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/. ssh/authorized_keys

modify the following two configurations at the same time:
PermitRootLogin no
StrictModes no

2. Restart the sshd service on the server side
/etc/init.d/sshd restart

3. Execute the following commands on the client to generate the secret key and public key (all the way back car, no need to set)
ssh-keygen -t rsa

4. Save the public key generated by the client and server to the [/home/hadoop/.ssh/authorized_keys] file on

the server 5. Then copy the [/home/ hadoop/.ssh/authorized_keys] copied to the client

6. Restart the ssh service
/etc/init.d/sshd restart

7. Use the ssh command to log in to the server for testing

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326581004&siteId=291194637