Comprehensive “don’t bother me” for SSH

Disabling host security for real. No more nagging.

George Shuklin
OpsOps
1 min readMar 9, 2020

--

Warning: Things I explain here are very dangerous. You can’t use this if you do not understand your threat model.

The problem

I’m developing a …thing. Sometime I break it for real and need to ask external provisioning system to reinstall my servers from scratch. Every reinstall causes ssh to complain about changed ssh keys.

For the long time I used a special script to update ssh keys for newly installed servers, but it was slow and annoying. Finally I’ve decided to make those hosts in my lab been completely insecure, and complain about nothing to me.

I wanted ssh to connect to specific servers no matter what ssh key host was presented.

Those lines aren’t rocket science and you shouldn’t use them for any address you connect through insecure net. Moreover, you should absolutely never pass you ssh key to those hosts, as it may become a real security issue.

The solution

Configuration snippet for ~/.ssh/config

The last line disables all warning, making it really silent.

Ansible tuning

The same set of lines for Ansible config file:

Or for ansible_ssh_args:

--

--

George Shuklin
OpsOps

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.