The first connection is trust on first use: you accept the fingerprint and it is stored. If it later differs, ssh warns that the host identification has changed. Host names can be hashed with ssh-keygen -H.
known_hosts
The client-side file of server host keys already trusted, used to detect a changed or fake server.