Challenge - 5 Problems
SSH Key Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this ssh-keygen command?
You run the command
ssh-keygen -t rsa -b 2048 -f mykey -N "" in a Linux terminal. What output will you see immediately after?Linux CLI
ssh-keygen -t rsa -b 2048 -f mykey -N ""
Attempts:
2 left
💡 Hint
Think about what ssh-keygen outputs when generating an RSA key with no passphrase.
✗ Incorrect
The command generates an RSA key pair with 2048 bits, saves it to 'mykey' and 'mykey.pub', and prints the fingerprint and randomart image. Option C matches this output exactly.
💻 Command Output
intermediate2:00remaining
What error does this ssh-keygen command produce?
You run
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N without specifying a passphrase value. What error message appears?Linux CLI
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N
Attempts:
2 left
💡 Hint
The -N option requires a passphrase argument, even if empty.
✗ Incorrect
The -N option must be followed by a passphrase string. Omitting it causes an error about missing argument.
📝 Syntax
advanced2:00remaining
Which ssh-keygen command correctly generates a 4096-bit RSA key with a comment?
Select the command that generates a 4096-bit RSA key with the comment 'admin@example.com' and saves it to 'admin_rsa'.
Attempts:
2 left
💡 Hint
Check the correct ssh-keygen option names for comment and file.
✗ Incorrect
Option A uses the correct short options: -t for type, -b for bits, -C for comment, and -f for file. Other options use invalid or incorrect flags.
🚀 Application
advanced2:00remaining
How to automate ssh-keygen to generate a key without prompts?
You want to write a script that generates an ed25519 SSH key named 'deploy_key' with no passphrase and no user interaction. Which command achieves this?
Attempts:
2 left
💡 Hint
Use options to suppress prompts and specify empty passphrase.
✗ Incorrect
Option B uses -N "" to set empty passphrase and -q to suppress output, so it runs without prompts. Others either prompt or use invalid options.
🧠 Conceptual
expert2:00remaining
What is the effect of the -o option in ssh-keygen?
You run
ssh-keygen -t rsa -b 2048 -o -f keyfile. What does the -o option do?Attempts:
2 left
💡 Hint
Think about key file formats and security improvements.
✗ Incorrect
The -o option tells ssh-keygen to save the private key in the new OpenSSH format, which is more secure than the older PEM format.