Docker container ignore host verification
Docker container ignore host verification
Docker container ignore host verification
Inside Docker containers, SSH host key verification often fails because the container has no known_hosts file and the host fingerprint changes between container restarts. This config disables host checking entirely — useful for automated deployment scripts inside containers, but never use this in production outside of a controlled environment.
Below config is not recommended for production use, please use with care
Docker container ignore host verification
1
2
3
4
5
touch ~/.ssh/config
echo 'Host *' >> ~/.ssh/config
echo 'StrictHostKeyChecking no' >> ~/.ssh/config
echo 'UserKnownHostsFile=/dev/null' >> ~/.ssh/config
cat ~/.ssh/config
This post is licensed under
CC BY 4.0
by the author.