To add host keys to the known_hosts file.
known_hosts
ssh-keyscan machinename >> ~/.ssh/known_hosts
Source: this serverfault.