Fetch a server ED25519 host key
Build a paste-ready command, then review its compatibility and effects before running it.
ssh-keyscan -t ed25519 -p 22 <host> 2>/dev/nullComplete required fields to copy the generated command.
read-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementsssh-keyscanssh-keyscan must be installed and available on PATH.
Version supportssh-keyscan Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsexample.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKf7fQ5wS3JbYZFhGJ5D0xUHTR6N2m3XnFx5Py1qL0kZRepresentative successful output; values vary with the selected target and system state.
Known errorsssh-keyscan: command not foundssh-keyscan is missing or is not available on PATH.
Verifyssh-keyscan -t ed25519 -p 22 {{host}} 2>/dev/nullThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01ssh-keyscanCommandRuns the ssh-keyscan stage of this one-liner.
02-tOptionConfigures ssh-keyscan with the -t option.
03ed25519ArgumentPasses ed25519 to ssh-keyscan.
04-pOptionConnects to the SSH service on the specified port.
0522ArgumentPasses 22 to ssh-keyscan.
06<host>ParameterA value supplied in the Fill parameters section.
072>RedirectionRedirects command input, standard output, or error output.
08/dev/nullArgumentPasses /dev/null to ssh-keyscan.
Example input
ssh-keyscan -t ed25519 -p 22 example.com 2>/dev/null
Example output
example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKf7fQ5wS3JbYZFhGJ5D0xUHTR6N2m3XnFx5Py1qL0kZ
Illustrative output — exact values vary by system and data.
Official sources