commands

ssh-keygen — Generate and inspect SSH keys

Generate a fresh key pair; -l displays fingerprint and -F searches known_hosts. Protect private keys with a passphrase; never overwrite existing keys. Nonzero status indicates failure or no match as applicable. Use a fresh private workspace; live operations are VM-only.

Formal Syntax & Structure

linux syntaxlinux
ssh-keygen -t TYPE -f FILE

Parameters & Attributes

NameTypeDescription
-toptionKey type
-foptionKey or known-hosts file
-loptionFingerprint
-FoptionFind host

Return Value

exit status and output

Generate a fresh key pair; -l displays fingerprint and -F searches known_hosts. Protect private keys with a passphrase; never overwrite existing keys. Nonzero status indicates failure or no match as applicable.

Working Example

Example Snippetlinux
ssh-keygen -l -f ./lab_ed25519.pub
Linux Reference