CompTIA Linux+ (XK0-005) — Question 197

A Linux administrator needs to transfer a local file named accounts.pdf to a remote /tmp directory of a server with the IP address 10.10.10.80. Which of the following commands needs to be executed to transfer this file?

Answer options

Correct answer: B

Explanation

The correct command is B, as 'scp' (secure copy) is specifically designed for transferring files securely between hosts over SSH. Option A is incorrect because 'rsync' is used for synchronizing files and directories and is not the best fit for this task without additional flags. Option C is incorrect because 'cp' is used for local file copying and cannot transfer files over a network. Option D is incorrect as 'ssh' is for establishing a secure shell session, not for file transfer.