Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --fix-up-the-mess to fix up Offending key warnings for the user in one quick step! #300

Closed
jidanni opened this issue Feb 24, 2019 · 3 comments

Comments

@jidanni
Copy link

jidanni commented Feb 24, 2019

We are all familiar with the old routine,

$ ssh ...
Warning: the ECDSA host key for 'ssh.example.org' differs from the key for the IP address '164.190.144.253'
Offending key for IP in /home/jidanni/.ssh/known_hosts:20
Matching host key in /home/jidanni/.ssh/known_hosts:30

$ ed  /home/jidanni/.ssh/known_hosts
11098
20d
w
10656
q

$ ssh ...
Warning: Permanently added the ECDSA host key for IP address '64.90.44.253' to the list of known hosts.

Well I have a new idea!

At the end of the initial warning just add
"... or if you are really sure, just use --fix-up-the-mess to fix up the mess"
and then all the user would need to do is one
$ ssh --fix-up-the-mess ...
and voila, the mess is all fixed up! Even no one-time "Permanently added..." message!

(Of course please choose a better name than --fix-up-the-mess.) Thanks!

@jidanni
Copy link
Author

jidanni commented Feb 24, 2019

Yes, I hope --fix-up-the-mess would:

  1. do the ed(1) etc. editing step for the user.
  2. do the second run or whatever to Permanently add that line.

Thanks!

@bagder
Copy link
Member

bagder commented Mar 15, 2019

You seem to be talking about the ssh tool (from openssh?) that isn't related to this project!

@jidanni
Copy link
Author

jidanni commented Mar 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants