Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to specify the SSH username in the config file.
Linux CLI
Host example
User [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a hostname instead of a username.
Leaving the username blank.
Using an invalid username.
✗ Incorrect
The 'User' directive sets the username for SSH connections. Here, 'admin' is the username to use.
2fill in blank
mediumComplete the code to specify the SSH port number in the config file.
Linux CLI
Host example
Port [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP or FTP ports instead of SSH port.
Leaving the port number out when a non-default port is needed.
✗ Incorrect
The default SSH port is 22. This line sets the port to connect to on the remote server.
3fill in blank
hardFix the error in the SSH config line to specify the identity file path.
Linux CLI
Host example
IdentityFile [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the public key file instead of the private key.
Using unrelated config or known_hosts files.
✗ Incorrect
The 'IdentityFile' should point to the private key file, usually '~/.ssh/id_rsa'. The public key or config files are incorrect here.
4fill in blank
hardFill both blanks to set the hostname and enable compression in the SSH config.
Linux CLI
Host [1] Compression [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a full domain name as the host alias when a simple name is expected.
Setting compression to 'no' when the goal is to enable it.
✗ Incorrect
The 'Host' directive names the SSH alias, here 'myserver'. 'Compression yes' enables data compression for faster transfers.
5fill in blank
hardFill all three blanks to create a config that sets the host alias, user, and disables strict host key checking.
Linux CLI
Host [1] User [2] StrictHostKeyChecking [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'StrictHostKeyChecking' values and setting it to 'yes' when disabling is intended.
Using a username that does not exist on the remote server.
✗ Incorrect
The host alias is 'devserver', the user is 'developer', and 'StrictHostKeyChecking no' disables the prompt for unknown hosts.