Score:0

How to fix offending key phrase, that pops up again and again?

jp flag

For a github repo I want to update it and I type

git fetch --all

on the command line, but I am always asked

Warning: the ECDSA host key for 'xxx.yyy' differs from the key for the IP address '123.456.789.000'
Offending key for IP in /etc/ssh/ssh_known_hosts:1042
Matching host key in /home/adietz/.ssh/known_hosts:1
Are you sure you want to continue connecting (yes/no)? 

I found similar questions with the solution to remove the offending line from the file

.ssh/known_host

but as soon as I repeat the git command the line is added to .ssh/known_host again, and I am asked over and over again. I even removed the complete file .ssh/known_host without luck.

I am still asked that yes/no question every time.

Is there any way to get rid of this annoyance? Ubuntu 20.04.4

jp flag
Does the key of the server change frequently? Normaly it shouldn't. Are there maybe multiple load balanced servers and you're hitting either one?
Score:1
in flag

You are editing the wrong file. The message says that the key found in .ssh/known_hosts is valid, the offending key is in /etc/ssh/ssh_known_hosts. Remove it there.

jp flag
Ah I see. Yes you are right. fixing is there did solve the problem. The error message is somewhat confusing though...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.