I’m working on Hadoop multi node cluster, so nodes communicate using SSH here is my problem:
- I have 3 computers connected to the same router
- This router sometimes gets restarted so the IP adress for the machines might change
- Every time this happens I edit
/etc/hosts
file updating IP address of machines named (master
,slave1
,slave2
) and it tells that this machine will be added.
At first when I configured SSH generating the key and copying it to other machines it worked perfectly, I could use ssh slave1
from master and logging in with no password prompt:
- I have edited
sshd_config
file and changedPubkeyAuthentication
tono
- Tried regenerating ssh key and used
ssh-copy-id
to copy it again to other computers (something likessh-copy-id ~/.ssh/id_rsa.pub user@host
in all computers)
It's ok for me to change the IP adress manually because I had big trouble trying to make IP address static, but I need to use ssh host
with no password prompt.
/etc/hosts
for something like this; your machines should all have their proper hostnames used for SSH. Next, IP address changes have nothing to do with SSH. Also, why would you disablePubkeyAuthentication
withno
? That is the exact opposite of what to describe you want to do? That should be set toyes
.