Reply
New Contributor
Posts: 1
Registered: ‎01-17-2019

how to set Password Less SSH between instances? cloudera manager cluster for hadoop.

I create 3 instances of Ubuntu Server 16.04 LTS using Amazon EC2 to setup cloudera manager cluster. get problem with Password Less SSH. i follow the step "https://www.novixys.com/blog/setup-apache-hadoop-cluster-aws-ec2/#Namenode_Password_Less_SSH" to implement, and when i run "ssh slaverhostname",it shows
Permission denied (publickey).and if i run "ssh -i ~/.ssh/pemfile.pem slaverhostname", i can connect to slaver instance successful. this can not satisfy my requirement.
I search on Google and get another answer "https://superuser.com/questions/331167/why-cant-i-ssh-copy-id-to-an-ec2-instance", run "eval "$(ssh-agent)"" and "ssh-add ~/.ssh/pemfile.pem", then i can use "ssh slaverhostname" successful.but if i reboot instance, ssh command does not work again, i have to run "eval "$(ssh-agent)"" and "ssh-add ~/.ssh/pemfile.pem" again.
So is there any solution that i can implement then i can use "ssh slaverhostname" all the time?

Announcements