2025-11-22:

.ssh/unknown_hosts

When ssh connects to an unknown host, it asks the user to type "yes". No one knows why we should do it, but ssh will not connect without it.

You can avoid this prompt in two ways:

# 1. Disable security check (unsafe)
$ ssh -o "StrictHostKeyChecking no" user@example.com
# 2. Automatically make remote host known
$ ssh-keyscan -t rsa example.com >> ~/.ssh/known_hosts
$ ssh user@example.com

There was no warning in the second case! And not because we disabled safety check, we made the host known to us!

Now you should understand that professional do different choices. Be professional, choose safety!

#linux #ssh #safety