0
0
Linux CLIscripting~10 mins

SSH connection basics 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 connect to a remote server using SSH.

Linux CLI
ssh [1]@example.com
Drag options to blanks, or click blank then click option'
Apassword
Buser
Cconnect
Dremote
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'password' instead of username in the ssh command.
Omitting the username entirely.
2fill in blank
medium

Complete the code to specify a custom port when connecting via SSH.

Linux CLI
ssh -p [1] user@example.com
Drag options to blanks, or click blank then click option'
A443
B80
C22
D2222
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 80 or 443 which are for web traffic, not SSH.
Using the default port 22 when a custom port is needed.
3fill in blank
hard

Fix the error in the SSH command to connect to the server.

Linux CLI
ssh [1]example.com -p 22
Drag options to blanks, or click blank then click option'
Auser@
B22
Cconnect
D2222
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the '@' between username and hostname.
Placing the port option before the hostname.
4fill in blank
hard

Fill both blanks to create an SSH command that connects to 'server.com' as 'admin' on port 2200.

Linux CLI
ssh [1]@[2] -p 2200
Drag options to blanks, or click blank then click option'
Aadmin
Buser
Cserver.com
Dexample.com
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping username and hostname positions.
Using the wrong hostname.
5fill in blank
hard

Fill all three blanks to create a command that copies a file 'file.txt' from local to remote server 'host.com' as user 'alice' using SCP.

Linux CLI
scp [1] [2]@[3]:~/
Drag options to blanks, or click blank then click option'
Afile.txt
Balice
Chost.com
Ddocument.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong file name.
Swapping username and hostname.
Omitting the colon ':' after hostname.