Recall & Review
beginner
What does SCP stand for and what is its main use?
SCP stands for Secure Copy Protocol. It is used to securely transfer files between computers over a network using SSH.
Click to reveal answer
beginner
Write the basic SCP command to copy a file named
report.txt from your local machine to a remote server at user@server.com in the /home/user/ directory.The command is: <br>
scp report.txt user@server.com:/home/user/<br>This copies report.txt from your local machine to the remote directory.Click to reveal answer
intermediate
How do you copy a directory and all its contents using SCP?
Use the
-r option to copy directories recursively. For example:<br>scp -r myfolder user@server.com:/home/user/<br>This copies the entire myfolder directory and its contents.Click to reveal answer
beginner
What happens if you omit the destination path in an SCP command when copying to a remote server?
If you omit the destination path, SCP copies the file to the remote user's home directory by default.
Click to reveal answer
beginner
How can you copy a file from a remote server to your local machine using SCP?
Use SCP with the remote file as the source and local path as the destination. For example:<br>
scp user@server.com:/home/user/report.txt ./<br>This copies report.txt from the remote server to your current local directory.Click to reveal answer
Which SCP option allows copying directories recursively?
✗ Incorrect
The
-r option tells SCP to copy directories and their contents recursively.What protocol does SCP use to secure file transfers?
✗ Incorrect
SCP uses SSH (Secure Shell) to encrypt and secure file transfers.
What is the default destination directory if none is specified in SCP when copying to a remote server?
✗ Incorrect
If no destination path is given, SCP copies files to the remote user's home directory.
How do you copy a file named
data.csv from a remote server to your local machine?✗ Incorrect
To copy from remote to local, specify the remote file path first, then local destination.
Which of these is NOT a valid SCP command?
✗ Incorrect
There is no
-x option in SCP; this makes the command invalid.Explain how to use SCP to transfer a directory from your local machine to a remote server.
Think about copying folders and how SCP secures the transfer.
You got /5 concepts.
Describe the difference between copying files to a remote server and copying files from a remote server using SCP.
Focus on which side (local or remote) comes first in the command.
You got /4 concepts.