Do I need to enter a password to start HDFS?

 Reason: Password-free login is not set, or password-free login setting is invalid

Solution: Reconfigure password-free login

1. Configure SSH password-free login and install ssh (if ssh is already installed in the system, ignore this step)

$ sudo apt install openssh-server

2. Add ssh.service service (if the system has installed ssh, ignore this step)

$ systemctl enable ssh.service

3. Start the ssh service process (if the system has installed ssh, ignore this step)

$ service sshd start

4. To generate a key pair, enter the following command and press the Enter key 3 times in a row

$ ssh-keygen -t rsa

5. The public key and private key are generated in the ~/.ssh/ directory

id_rsa id_rsa.pub

6. Append the public key to the local authorized_keys

$ ssh-copy-id -i /home/hadoop/.ssh/id_rsa.pub ubuntu

Note: 1. Change hadoop in the command to your own user name 2. Change ubuntu in the command to your own hostname to verify whether the ssh password-free login is configured successfully. You need to enter "yes" when logging in for the first time, and then enter the account password. After that, you don't need to log in again.

$ ssh ubuntu

Note: Change ubuntu in the command to your own hostname

7. After successful login, the path will automatically change to ~, enter exit to log out.

Guess you like

Origin blog.csdn.net/m0_74972727/article/details/130732808
Recommended