I'm having an issue with OpenSSH 7.6p1 on a fresh install of Ubuntu 16.04 (a problem that didn't exist on my previous Ubuntu, which I copied the config file from. Unfortunately, that OS has been destroyed)
I'm trying to turn off strict host key checking for a specific set of domains (in the example below, anything matching
/etc/ssh/ssh_config is completely commented out. I have a config file in
~/.ssh/config that equates to this:
Host *.mydomain.com StrictHostKeyChecking no UserKnownHostsFile /dev/null Host foo HostName myserver.mydomain.com PasswordAuthentication yes User myuser
Now, when I execute
ssh foo, I would expect that to alias to
firstname.lastname@example.org, realize that it should not perform StrictHostKeyChecking, ask me for a password and (when the correct password is entered), write a new Host Key entry to
/dev/null (which, ofc, is essentially a NOP).
However, when I execute
ssh foo presently on my system, it does alias and attempt to connect to the correct server with the correct user (meaning, it's reading my config file, otherwise it wouldn't know what 'foo' was), but gives me a Host Key Validation Error (which would otherwise be correct, as the Host Key is wrong in known_hosts). If I delete the offending key from known_hosts and try again, it writes the new Host Key into known_hosts instead of /dev/null. Essentially, it's like the first stanza in my config file is being ignored.
Is that an issue with my configuration, or is this a known issue or something? Any assistance would be appreciated.