1

I started getting this error

Received disconnect from 192.30.253.112 port 22:2: Connection blocked because server only allows public key authentication. Please contact your network administrator.
Disconnected from 192.30.253.112 port 22

when I tried to commit in git. Quick googling suggested me to remove the data in ~/.ssh/known_hosts and try. When I removed the data in known hosts and tried 'git pull'

I got this.

The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:ObNq2tWLML/5O9W4GkU6sqOH5e3KNdxtxT3KU1/9gok.
Are you sure you want to continue connecting (yes/no)

However the RSA key fingerprint that I got did not match with the ones given by github

If I give yes and continue I am getting this error.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

What should I do now?

Not able to commit or pull.

Surya
  • 2,429
  • 1
  • 21
  • 42

1 Answers1

1

If the hash does not match, it means that the server you're communicating with sent a different key. Github would probably not change keys without a salient public warning. So, the server is a different server impersonating github server. It could be an evil attacker and/or a corporate proxy.

- Stéphane Gourichon

wjandrea
  • 28,235
  • 9
  • 60
  • 81
Surya
  • 2,429
  • 1
  • 21
  • 42