Examples (4)
Retrieve all public SSH keys of a remote host
Retrieve all public SSH keys of a remote host listening on a specific port
Retrieve certain types of public SSH keys of a remote host
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 hostnameManually update the SSH known_hosts file with the fingerprint of a given host
ssh-keyscan -H hostname >> ~/.ssh/known_hostsmade by @shridhargupta | data from tldr-pages