Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Password-free login setting of ubuntu system ssh during hadoop installation

Shulou Source: shulou.com Published: 2022-06-03 04:49:03 11月16日 Update

At the beginning of contact, not very familiar with, make a small record, correct later

Generate public and private keys

Ssh-keygen-t dsa-P''- f ~ / .ssh/id_dsa

Import the public key into the authorized_keys file

Cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

Normally, ssh will not need to use a password when logging in at this time.

If prompted: Permission denied, please try again

Modify ssh configuration, path / etc/ssh/sshd_config

PermitRootLogin without-password

Change it to PermitRootLogin yes

If you still need to use a password during ssh after the above configuration, there should be a problem with the public key of the current machine. You can send the public key of the target machine to the current machine again and import it into the authorized_keys file again.

For example, master can log in to slave without a password, but slave cannot log in to master, indicating that there is a problem with the public key of slave. In this case, send the authorized_keys of master to master.

Tags: Public key password machine login again file problem configuration at the same time situation target path Koji contact prompt generation login system process Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL Shulou Technology Shulou Information OPPO Reno