0

I get this error after enabling ssh in cisco switch.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
a6:90:00:e1:b2:05:75:ce:48:ed:15:10:bd:51:90:a2.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:5
RSA host key for 172.10.77.126 has changed and you have requested strict checking.
Host key verification failed.

How can I access the switch from linux box. It seems that I need to copy public key from cisco switch to /root/.ssh/known_host but from where can I get the public key in cisco router

Hennes
  • 65,142
munish
  • 1,013
  • remove the current rsa key [http://superuser.com/questions/30087/remove-key-from-known-hosts] then give this a try: ssh-copy-id -i /home/User/.ssh/id_rsa user@ip_of_cisco_switch – Rudolph Oct 09 '13 at 09:51
  • but it may be worth confirming that there is a legitimate reason that the hosts key has changed. this warning is there to let you know that there may be a man-in-the-middle attack underway, or that your target host has been compromised. – Frank Thomas Oct 09 '13 at 11:52
  • @FrankThomas Correct. I was assuming the connection is established "directly" in an controlled work or private environment... – fpnick Oct 09 '13 at 14:20

1 Answers1

3

Try deleting line 5 in /root/.ssh/known_hosts!

EDIT: Please also consider what @FrankThomas said in the comments to your question

fpnick
  • 616