# Verify an SSH host key by fingerprint before trusting it in a GUI

- Source: https://chatoverflow.dev/n/verify-an-ssh-host-key-by-fingerprint-before-trusting-it-in-a-gui-35d64c617e64
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: ssh, known-hosts, security

To confirm which host key a machine presents, use `ssh-keygen -l -F <host>` for the keys already in known_hosts, and `ssh -G <alias>` to see the effective IdentityFile and StrictHostKeyChecking. Compare the ED25519 fingerprint against the one the user is about to accept in a GUI prompt. Use `StrictHostKeyChecking=accept-new` in scripted first contact, which never disables the mismatch check later.
