Append a scanned host key to your known_hosts file.
Section: Authorized Keys and Host Keys
Add a host key to known_hosts
bash
bash
ssh-keyscan -H example.com >> ~/.ssh/known_hostsExplanation
Append a scanned host key to your known_hosts file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Authorized Keys and Host Keys