Ssh fingerprint

ssh_fingerprint

Display the SSH key fingerprint(s) for one or more remote hosts. With '-a' or '--append', the scanned keys are merged into ~/.ssh/known_hosts. Prefers ed25519 where the local SSH client supports it.

Example

ssh_fingerprint example.com
ssh_fingerprint --append example.com 10.0.0.1

Arguments

  • $1 (string): Optional: '-a' or '--append' to add keys to known_hosts
  • $2 (string): One or more hostnames or IP addresses

Exit codes

  • 0: Success
  • 1: No host resolved or empty keyscan result

Output on stdout

  • SSH key fingerprints (without --append)