How to get the fingerprint of SSH public keys

From public key file

sha256 fingerprint (default)

Displays the fingerprint of id_rsa.pub with the sha256 hash algorithm.

md5 fingerprint

Displays the fingerprint of id_rsa.pub with the md5 hash algorithm.

 

From SSH agent

sha256 fingerprint (default)

Displays the fingerprint of all known keys by SSH-Agent with the sha256 hash algorithm.

md5 fingerprint

Displays the fingerprint of all known keys by SSH-Agent with the md5 hash algorithm.