<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Automation on Linux Security</title><link>https://linuxtransfer.com/tags/automation/</link><description>Recent content in Automation on Linux Security</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 14 Oct 2026 10:00:02 +0200</lastBuildDate><atom:link href="https://linuxtransfer.com/tags/automation/index.xml" rel="self" type="application/rss+xml"/><item><title>Easily Remove Stale Entries from ~/.ssh/known_hosts When a Host Rebuilds with ssh-keygen ‑R</title><link>https://linuxtransfer.com/post/2026-10-14-easily-remove-stale-entries-fromsshknownhosts/</link><pubDate>Wed, 14 Oct 2026 10:00:02 +0200</pubDate><guid>https://linuxtransfer.com/post/2026-10-14-easily-remove-stale-entries-fromsshknownhosts/</guid><description>&lt;h2 id="when-a-host-rebuilds-its-ssh-key-changes">When a host rebuilds, its SSH key changes&lt;/h2>
&lt;p>A fresh install or a system rebuild swaps the host’s RSA/ED25519 key pair.&lt;br>
If you still have the old key in &lt;code>~/.ssh/known_hosts&lt;/code>, the next SSH connection will
trigger a “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!” message.&lt;br>
That warning is a safety feature, but it also blocks automation and forces users
to manually edit the file.&lt;/p>
&lt;p>The quickest, safest way to clean up stale entries is to let OpenSSH do the work
with &lt;code>ssh-keygen -R&lt;/code>. The command removes every key that matches the supplied
hostname or IP, regardless of whether the entry is hashed or plain.&lt;/p></description></item></channel></rss>