Monday, May 13, 2013

Hadoop: Remote Host Identification Has Changed error and solution


When you are running Hadoop in pseudo Distributed Mode, you had to run in local server (localhost),


Then, to enable password-less login, generate a new SSH key with an empty passphrase:
         % ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
         % cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

Test this with:
         % ssh localhost

If successful, you should not have to type in a password.
Sometimes you will find below error, to resolve this follow any one of the approach as stated below.



@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
5c:9b:16:56:a6:cd:11:10:3a:cd:1b:a2:91:cd:e5:1c.
Please contact your system administrator.
Add correct host key in /home/user/.ssh/known_hosts to get rid of this message.
Offending key in /home/user/.ssh/known_hosts:1
RSA host key for ras.mydomain.com has changed and you have requested strict checking.
Host key verification failed.

How do I get rid of this message?

If you have reinstalled Linux or UNIX with OpenSSH, you will get the above error. To get rid of this problem:

Solution #1: Remove keys

Use the -R option to removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts. If your remote hostname is server.example.com, enter:
$ ssh-keygen -R {server.name.com}
$ ssh-keygen -R {ssh.server.ip.address}
$ ssh-keygen -R server.example.com

$ ssh-keygen -R localhost


Sample output:

/home/vivek/.ssh/known_hosts updated.
Original contents retained as /home/vivek/.ssh/known_hosts.old
Now, you can connect to the host without a problem.

Solution #2: Add correct host key in /home/user/.ssh/known_hosts

It is not necessary to delete the entire known_hosts file, just the offending line in that file. For example if you have 3 server as follows.

myserver1.com,64.2.5.111 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA11FV0EnGahT2EK8qElocjuHTsu1jaCfxkyIgBTlxlrOIRchb2pw8IzJLOs2bcuYYfa8nSXGEcWyaFD1ifUjfHelj94AAAAB3NzaC1yc2EAAAABIwAAAIEA11FV0E
nGahT2EK8qElocjuHTsu1jaCfxkyIgBTlxlrOIRchb2pw8IzJLOs2bcuYYfa8nSXGEcWyaFD1ifUjfHelj94H+uv304/ZDz6xZb9ZWsdm+264qReImZzruAKxnwTo4dcHkgKXKHeefnBKyEvvp/2ExMV9WT5DVe1viVwk=

myserver2.com,125.1.12.5 ssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAtDiERucsZzJGx/1kUNIOYhJbczbZHN2Z1gCnTjvO/0mO2R6KiQUP4hOdLppIUc9GNvlp1kGc3w7B9tREH6kghXFiBjrIn6VzUO4uwrnsMbnAnscD5EktgI7fG4ZcNUP 5+J7sa3o+rtmOuiFxCA690DXUJ8nX8yDHaJfzMUTKTGxQz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/IyI4NxHhhpltYZKW/Qz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/M7L0vKeTObue1SgAsXADtK3162a/Z6MGnAazIviHBldxtGrFwvEnk82+GznkO3IBZt5vOK2heBnqQBfw=

myserver3.com,125.2.1.15 ssh-rsa
5+J7sa3o+rtmOuiFxCA690DXUJ8nX8yDHaJfzMUTKTGx0lVkphVsvYD5hJzm0eKHv+oUXRT9v+QMIL+um/IyI4NxHhhpltYZKW
as3533dka//sd33433////44632Z6MGnAazIviHBldxtGrFwvEnk82/Qz4M/H2P8L2R//qLj5s3ofzNmgSM9lSEhZL/M7L0vKeTObue1SgAsXADtK3162a/Z6MGnAazIviHBldxtGrFwvEnk82+GznkO3IBZt5vOK2heBnqQBfw==

To delete 2nd server (myserver.com), open file:
# vi +2 .ssh/known_hosts

And hit dd command to delete line. Save and close the file. Or use following
$ vi ~/.ssh/known_hosts

Now go to line # 2, type the following command
:2

Now delete line with dd and exit:
dd
:wq

Solution 3:  Just delete the known_hosts file If you have only used one ssh server

$ cd
$ rm .ssh/known_hosts
$ ssh ras.mydomain.com

Now you should be able to connect your server via ssh.

33 comments:

mareddyonline said...

Thank for sharing this great Hadoop tutorials Blog post. I will use your command when upgrade hadoop.
Hadoop Training in hyderabad

Hadoop online training said...

Hi,
Nice to share about hadoop big data.The best hadoop online trainers provides online training on hadoop with real time experienced experts
hadoop training

Unknown said...

Thanks for sharing this here.


Hadoop Training Chennai
Hadoop Training in Chennai

Unknown said...

Learning new technology would give oneself a true confidence in the current emerging Information Technology domain. With the knowledge of big data the most magnificent cloud computing technology one can go the peek of data processing. As there is a drastic improvement in this field everyone are showing much interest in pursuing this technology. Your content tells the same about evolving technology. Thanks for sharing this.

Hadoop Training in Chennai | Best Hadoop Training in Chennai | Best hadoop training institute in chennai | Big Data Hadoop Training in Chennai

Arjun kumar said...

I have finally found a Worth able content to read. The way you have presented information here is quite impressive. I have bookmarked this page for future use. Thanks for sharing content like this once again. Keep sharing content like this.

Software testing training in chennai | Software testing training | Manual testing training in Chennai

Unknown said...

Salesforce.com is an american company which offfers CRM based cloud services and it is loved globally for it quality services
salesforce training in chennai|salesforce training institute in chennai | salesforce course in chennai

Divit said...

Thank you so much! That did the trick, you saved me more endless hours of searching for a fix.

Bigdata Hadoop Training

Unknown said...

Everyone wants to get unique place in the IT industry’s for that you need to upgrade your skills, your blog helps me improvise my skill set to get good career, keep sharing your thoughts with us.
Salesforce Training|Salesforce Training institutes in Chennai|Salesforce Course in Chennai

Unknown said...

lenovo laptop service center chennai

lenovo thinkpad service center chennai

lenovo ideapad service center chennai

lenovo laptop service center in vadapalani

vignesjoseph said...

Android libraries which have many basic functions like data storage and the graphic rendering.Learning to code is difficult enough on its own but with Android development it can be more complicated.Android Training in Chennai.If want to do learning from Java to reach us Besant technologies.They Provide at real-time Java Training.Java Training in Chennai

Sumaya Manzoor said...

I am always searching online for articles that can help. There is obviously a lot to know about this. I think you made some good points
Selenium Training in Chennai
JAVA Training in Chennai
Big Data Training in Chennai
Hadoop Training in Chennai
iOS Training in Chennai
Selenium Courses in Chennai

yuvaprithika said...

This information is impressive. I am inspired with your post writing style & how continuously you describe this topic. Eagerly waiting for your new blog keep doing more.

Franchise Business in India
Education Franchise
Computer Education Franchise
Education Franchise India
Computer Center Franchise
Education Franchise Opportunities in India
Franchise For Spoken English Classes
Computer Training Institute Franchise
English Language School Franchise
Best Education Franchise In India

Shiva Shakthi said...

Great information!!! Thanks for your wonderful informative blog.
PHP Training Institute in Coimbatore
PHP Training Coimbatore
PHP Training Institute in Coimbatore
Best PHP Training Institute
PHP Training

pavithra dass said...

This is a good post. This post give truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. thank you so much. Keep up the good works.
Java Training in Chennai
Java Training
Java Classes in Chennai
Core Java Training in Chennai
Java Training center in Chennai
Java Certification course in Chennai
Java Coaching Center in Chennai

mercyroy said...

More informative,thanks for sharing with us.this blog makes the readers more enjoyable.keep add more info on your page.
best android development institute in bangalore
Android Training in Thirumangalam
Android Training in Thirumangalam
Android Training in Nungambakkam
Android Training in Perungudi

Anbarasan14 said...

Very impressive blog! i liked it and was very helpful for me.Thanks for sharing. Do share more ideas regularly.

Spoken English Classes in OMR | Spoken English Classes in Perungudi | Spoken English in Chennai | Best Spoken English Institute in Chennai | Spoken English Classes in Siruseri | Spoken English Classes in Karapakkam | Spoken English Training center in Chennai

Unknown said...

Awesome Post. Thanks for Sharing. Kepp updating.
pega training in chennai
pega course in chennai
pega training institutes in
chennai

pega course

srinithya said...

Informative post, thanks for sharing.
Blue Prism Training Institute in Chennai
Blue Prism course in Chennai
Blue Prism Training in Velachery
AWS Training in Chennai
Angularjs Training in Chennai
RPA Training in Chennai

Anonymous said...

It is an amazing post. Keep sharing this kind of worthy information.

Mobile Testing Course in Chennai | Mobile Testing Training in Chennai | Mobile Automation Testing Training in Chennai | Mobile Testing Course in Adyar | Mobile Testing Training in Velachery | Mobile Testing Training in Tambaram

LindaJasmine said...

Thanks for sharing the amazing post.It is very much informative. I am very eager to read your upcoming post.
Primavera Training in Chennai
Primavera Course in Chennai
Primavera Software Training in Chennai
Best Primavera Training in Chennai
Primavera p6 Training in Chennai
Primavera Coaching in Chennai

nilashri said...

I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
Data Science training in Chennai | Data science training in bangalore

Data science training in pune | Data science online training

Data Science Interview questions and answers

afiah b said...

I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
Java training in Chennai | Java training in USA |

Java training in Bangalore | Java training in Indira nagar | Java training in Bangalore | Java training in Rajaji nagar

shalinipriya said...

It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

Data Science training in Chennai | Data science training in bangalore

Data science training in pune | Data science online training

Data Science Interview questions and answers

gowsalya said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
advanced excel training in bangalore | Devops Training in Chennai

sabee said...



Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.


AWS Training in BTM Layout |Best AWS Training in BTM Layout

AWS Training in Marathahalli | Best AWS Training in Marathahalli

prabha said...

I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
aws Training in indira nagar | Aws course in indira Nagar

selenium Training in indira nagar | Best selenium course in indira Nagar | selenium course in indira Nagar

python Training in indira nagar | Best python training in indira Nagar

datascience Training in indira nagar | Data science course in indira Nagar

devops Training in indira nagar | Best devops course in indira Nagar

priya rajesh said...

Excellent post with lots of information.
Blockchain Training in Chennai
Blockchain Training in T Nagar

Vicky Ram said...

I have to thank for sharing this blog admin, really helpful to me.

bloggydirectory
Guest posting sites

hari said...

good
Bermuda web hosting
Botswana hosting
armenia web hosting
lithuania shared web hosting
inplant training in chennai
inplant training in chennai for it
suden web hosting
tunisia hosting
uruguay web hosting

Mrbk30 said...

Very Informative blog thank you for sharing. Keep sharing.

Best software training institute in Chennai. Make your career development the best by learning software courses.

rpa certification in chennai
blue prism training in chennai
best php training institute in chennai
DevOps Training in Chennai
cloud computing training in chennai
Uipath training in chennai
microsoft azure training in chennai

Reshma said...

Wonderful post and more informative!keep sharing Like this!
Full stack developer course in Bangalore
Full stack developer course in Pune

Block said...

It’s always so sweet and also full of a lot of fun for me personally and
my office colleagues to search your blog a minimum of thrice in a
week to see the new guidance you have got.
mysql training in chennai
unix training in chennai
Software training institute in chennai

David Fincher said...

This post is so interactive and informative.keep update more information...
German Classes in Velachery
German Classes in chennai

Popular Posts