Skip to main content
← back to field notes
One min readDevelopment

Fixing bad SSH keys

sshsecurity

SSH keys are a great way to authenticate with a remote server. They are secure, and they are easy to use. However, they can be a pain to manage. If you have ever had to deal with a bad SSH key, you know what I mean. Especially if you are using cloud services where IP addresses may be reused.

If you are connecting to a known host, where the IP address has changed, or if the IP has been reassigned to a different host, it become necessary to remove the old key from your known hosts file. This can be done with the following command:

ssh-keygen -R [IP]
field notes

you may also enjoy

more from this thread of thought

Introducing "Ink and Agency" a skill pack for humans (and claude)
May 18, 2026

Introducing "Ink and Agency" a skill pack for humans (and claude)

read more →
working with git: archive
Aug 5, 2025

working with git: archive

read more →
Surprise Driven Development
Jul 10, 2025

Surprise Driven Development

read more →
What's in a .git? A Deep Dive into Git's Hidden Engine
Jun 3, 2025

What's in a .git? A Deep Dive into Git's Hidden Engine

read more →
Git Worktrees: Multiple Branches, Zero Context Switching
May 30, 2025

Git Worktrees: Multiple Branches, Zero Context Switching

read more →
Walking Back with Git: HEAD^ vs HEAD~ Demystified
May 29, 2025

Walking Back with Git: HEAD^ vs HEAD~ Demystified

read more →
the field notes

recently written