Yeah, ssh may be quite stubborn in cases when we want to move the slider towards convenience and away from security.
My personal working use case and local environment is based on the following:
- I use key based authentication
- my ssh client is
OpenSSH_9.4p1, LibreSSL 3.3.6
If I already have some outdated host identification recorded within
~/.ssh/known_hosts
then I get the following reasoning from the ssh:
It explicitly says that password-based auth is off: "Password authentication is disabled to avoid man-in-the-middle attacks.".
But if I clean my
~/.ssh/known_hosts
from such old records or remove the file completely, then
StrictHostKeyChecking no
option works with password-based authentication:
Code:
> ssh taarch64
Warning: Permanently added '[127.0.0.1]:2202' (ED25519) to the list of known hosts.
(root@127.0.0.1) Password for root@taarch64:
I hope it helps to align it with your environment and use case.