CompTIA Linux+ (XK0-005) — Question 289
When trying to connect from the bastion host to the remote server, a Linux user always forgets to add some required options in the SSH command line. Which of the following is the best way to permanently solve the user's issue?
Answer options
- A. Write a connection script and put it in the user's home directory.
- B. Instruct the user to add the required options to the ~/.ssh/config file.
- C. Add the required options to /etc/ssh/ssh_config.
- D. Establish an alias for the SSH command with all the required options.
Correct answer: B
Explanation
The correct answer is B because adding the required options to the user's ~/.ssh/config file allows those options to be applied automatically for each connection, eliminating the need to remember them each time. Option A, while helpful, requires the user to run a script, which may still be forgotten. Option C affects all users and is not specific to the individual user, while option D requires the user to remember to use the alias instead of the standard SSH command.