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 FILEParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -t | option | Key type |
| -f | option | Key or known-hosts file |
| -l | option | Fingerprint |
| -F | option | Find 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