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/hostsfile 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_configfile and changedPubkeyAuthenticationtono - Tried regenerating ssh key and used
ssh-copy-idto copy it again to other computers (something likessh-copy-id ~/.ssh/id_rsa.pub user@hostin 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.