To generate a public key from a private key:
ssh-keygen -y -f ~/.ssh/<private key>
To gather the SSH fingerprints of a machine and add them in the known_hosts
file:
ssh-keyscan -H <host or ip> >> ~/.ssh/known_hosts
To delete the SSH fingerprint of a machine and remove them from the known_hosts
file:
ssh-keygen -R <host or ip> -f ~/.ssh/known_hosts