scp Interview Questions and Answers¶
Introduction¶
These questions test whether you understand what scp does, when to use it, and how to verify the result on Linux.
Beginner Questions¶
What does scp do?
It copies files between hosts over SSH.
Show a basic command.
scp file.txt admin@server:/tmp/
Intermediate Questions¶
Name useful options.
-r: copy directories recursively.-P: connect to a custom SSH port.-i: use a private key file.
Show a common administrator command.
scp admin@server:/var/log/app.log .
Scenario-Based Questions¶
How would you handle scp copy directory?
scp -r project admin@server:/srv/
What would you verify afterward?
ssh admin@server ls -l /tmp/file.txt
Expected output should look similar to:
-rw-r--r-- 1 admin admin 1200 May 30 10:00 /tmp/file.txt
Practical Task Questions¶
Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.
Quick Review¶
scp file.txt admin@server:/tmp/
scp admin@server:/var/log/app.log .
ssh admin@server ls -l /tmp/file.txt
Related Guides¶
Summary¶
A strong scp answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.