0
0
Linux CLIscripting~10 mins

SSH key generation (ssh-keygen) in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to generate a new SSH key pair using the default RSA algorithm.

Linux CLI
ssh-keygen [1]
Drag options to blanks, or click blank then click option'
A-t rsa
B-p
C-f
D-l
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-p' which is for changing passphrase.
Using '-f' which specifies file name.
Using '-l' which lists fingerprints.
2fill in blank
medium

Complete the code to specify the file name for the SSH key pair.

Linux CLI
ssh-keygen -t rsa [1] ~/.ssh/my_custom_key
Drag options to blanks, or click blank then click option'
A-C
B-f
C-l
D-p
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-p' which is for passphrase.
Using '-l' which lists fingerprints.
Using '-C' which adds a comment.
3fill in blank
hard

Fix the error in the command to add a comment to the SSH key.

Linux CLI
ssh-keygen -t rsa -C [1]
Drag options to blanks, or click blank then click option'
Amykey
Bmykey@example.com
C"mykey@example.com"
D-C
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the comment with special characters.
Using the option '-C' again as a value.
Using a comment without '@' when an email is expected.
4fill in blank
hard

Fill both blanks to generate an Ed25519 SSH key with a custom file name.

Linux CLI
ssh-keygen [1] [2] ~/.ssh/id_ed25519_custom
Drag options to blanks, or click blank then click option'
A-t ed25519
B-f
C-p
D-C
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-p' which is for passphrase.
Using '-C' which is for comment.
Mixing up the order of options.
5fill in blank
hard

Fill all three blanks to generate an RSA SSH key with a comment and a custom file name.

Linux CLI
ssh-keygen [1] [2] ~/.ssh/id_rsa_custom [3] "user@example.com"
Drag options to blanks, or click blank then click option'
A-t rsa
B-f
C-C
D-p
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-p' instead of '-C' for comment.
Not quoting the comment.
Omitting the file name option.