How to only show host key of a SSH server
ssh-keyscan -t ed25519 ssh.my-domain.com 2>/dev/null | awk '{print $3}'
Example output
AAAAC3NzaC1lZDI1NTE5AAAAIF6MwU1Wv+RUGjnMTw819+YnIj/vvLgdE0YrLTO1mB5J
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow