To read all public keys from the host at port number 22
$ ssh-keyscan -p 22 192.168.122.50
To read all public keys of the rsa type
$ ssh-keyscan -t rsa 192.168.122.50
To update the known_hosts file located in the path, ~/.ssh/known_hosts
$ ssh-keyscan -H 192.168.122.50 >> ~/.ssh/known_hosts