Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How to bypass SSH destination host key fingerprint check?

When you first connect to a host, ssh asks you about saving its fingerprint. If you do, on subsequent connections it will check the fingerprint and refuse to connect if it changed. I get that this...

1 answer  ·  posted 1y ago by matthewsnyder‭  ·  last activity 1y ago by Canina‭

Question ssh
#1: Initial revision by user avatar matthewsnyder‭ · 2023-10-11T15:35:28Z (about 1 year ago)
How to bypass SSH destination host key fingerprint check?
When you first connect to a host, `ssh` asks you about saving its fingerprint. If you do, on subsequent connections it will check the fingerprint and refuse to connect if it changed.

I get that this is a security measure in case someone tries to impersonate my server.

However, it is also very annoying when using a VPS. I give my public key to the VPS provider, so that it gets spun up with the key "baked in", and I can do a one click reset. But when I do reset, because the new machine is technically a different machine, `ssh` predictably pouts and complains. However, *obviously* it's fine for the fingerprint to not match, because I just re-provisioned the server myself a minute ago! But, `ssh` doesn't know that.

Right now I have to open `~/.ssh/known_hosts`, find the line for me host among the many in there, delete it, try again, press yes again... Not the end of the world but a bit tedious.

Isn't there some CLI switch or something that tells SSH to stop whining about fingerprints just this time, and just automatically update `known_hosts` for me?
ssh