A server administrator needs to securely download the application log file /var/log/app.log from a remote server with the IP address 10.100.5.25 to the current directory on their local machine. The username for the remote server is sysops. Which of the following commands should the administrator execute on their local machine to perform this action?
The correct command is scp [email protected]:/var/log/app.log .. This command uses the Secure Copy Protocol (SCP) with the proper syntax to copy a file from a remote source to a local destination. The syntax is scp [user]@[host]:[remote_path] [local_path]. In this case, [email protected]:/var/log/app.log is the remote source, and . is the shorthand for the current local directory. The command scp /var/log/app.log [email protected]:. incorrectly reverses the source and destination, attempting to upload a local file. The command sftp [email protected]:/var/log/app.log . uses the incorrect tool; SFTP is typically an interactive protocol and does not use this command-line syntax for a direct copy. The command ssh [email protected] 'GET /var/log/app.log' is incorrect because it attempts to run a GET command on the remote server via SSH, and GET is not a standard shell command for file retrieval; it is more akin to FTP syntax.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.