Generate an RSA-format key with ssh-keygen.
Which option specifies the key type?
ssh-keygen -t specifies the key algorithm type; -b specifies key length and -f specifies the file name.
Detailed explanation
ssh-keygen -b rsaIncorrect. -b specifies the number of key bits.
ssh-keygen -f rsaIncorrect. -f specifies the output file name.
ssh-keygen -p rsaIncorrect. -p changes a private-key passphrase.
ssh-keygen -t rsaCorrect. -t rsa selects the RSA key type.
Try it yourself
An example you can run in a temporary verification environment.
ssh-keygen -? 2>&1 | grep -E -- '-t type' | head -n 1Expected result
-t typeKey points
- -t type
- -b bits
- -f filename
Notes
- Environment: OpenSSH client help
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Host key
A server identity key used by SSH clients to detect a changed endpoint.
User key
A key pair used to authenticate a user to an SSH server.
Port forwarding
An SSH tunnel that carries traffic between a local, remote, or dynamic endpoint.