Interview Prep/Python for DevOps/boto3, HTTP & API errors

`paramiko.ssh_exception.SSHException: Server '10.0.1.15' not found in known_hosts`

BeginnerTroubleshootingboto3, HTTP & API errors
Answer

Likely causes → The default policy is RejectPolicy, and the host key is not in the loaded known_hosts (or you never called load_system_host_keys()).

Diagnose →

ssh-keygen -F 10.0.1.15

Fix → Load known hosts (client.load_system_host_keys()), and add the host key from a trusted source (provisioning output, ssh-keyscan over a trusted network, SSH CA). Avoid switching to AutoAddPolicy in production.

Prevent → Distribute host keys or SSH certificates as part of provisioning.

All Python for DevOps questions Roadmap: Python for automation

More on boto3, HTTP & API errors