0
0
Linux CLIscripting~10 mins

Why SSH enables secure remote management in Linux CLI - Test Your Understanding

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

Complete the command to start a secure SSH session to a remote server.

Linux CLI
ssh [1]@example.com
Drag options to blanks, or click blank then click option'
Auser
Bconnect
Clogin
Dremote
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'connect' or 'login' instead of the username causes errors.
2fill in blank
medium

Complete the SSH command to specify a custom port number 2222.

Linux CLI
ssh -p [1] user@example.com
Drag options to blanks, or click blank then click option'
A80
B443
C2222
D22
Attempts:
3 left
💡 Hint
Common Mistakes
Using default port 22 when a custom port is required.
3fill in blank
hard

Fix the error in the SSH command to copy a file securely to a remote server.

Linux CLI
scp [1] -P 2222 file.txt user@example.com:/home/user/
Drag options to blanks, or click blank then click option'
A-r
B-P
C-p
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase -p instead of uppercase -P for port specification.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps usernames to their lowercase versions if the username starts with 'a'.

Linux CLI
{user: [1] for user in users if user.[2]('a')}
Drag options to blanks, or click blank then click option'
Auser.upper()
Buser.lower()
Cstartswith
Dendswith
Attempts:
3 left
💡 Hint
Common Mistakes
Using endswith instead of startswith.
Not normalizing case before checking.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps filenames to their sizes if the size is greater than 1000 bytes.

Linux CLI
file_sizes = { [1]: [2] for [3] in files if files[[3]] > 1000 }
Drag options to blanks, or click blank then click option'
Afilename
Bfiles[filename]
Dsize
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names inconsistently.
Not accessing the size correctly.