When I push/pull repos on GitHub over SSH, sometimes there will a message about unidentified server and asks if I want to trust and add it to known_hosts. Apparently this is because GitHub has multiple IPs.
What I don't understand is why SSH needs to record the hostname in
known_hosts. When I use my private key to authenticate myself to GitHub, there is no need for me to present an IP/domain name to GitHub. Why cant' SSH authenticate the server as original with only its key?