You want typing ssh web01 on its own to connect to 198.51.100.20 on port 2222 as the user deploy, and you want the shortcut to apply to your account only. Which file takes those settings?

LPIC-1 Exam 102-500, objective 110. Security easy

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct ~/.ssh/config

Correct. The per-user client configuration file holds Host blocks whose keywords, such as HostName, Port, User and IdentityFile, apply to matching command lines. It affects only the account that owns it.

Not correct /etc/ssh/ssh_config

Wrong for this requirement, though the syntax is the same. This is the system-wide client configuration, so the shortcut would apply to every user on the machine, and editing it needs root.

Not correct /etc/ssh/sshd_config

Wrong. sshd_config configures the SSH server on this machine, deciding things such as PermitRootLogin and X11Forwarding. Client keywords are not valid in it.

Not correct ~/.ssh/known_hosts

Wrong. known_hosts is a record of the public host keys of servers already visited. It is data written by the client, not a place for configuration keywords.

Why

The SSH client reads options in a fixed order: the command line first, then ~/.ssh/config, then /etc/ssh/ssh_config, and for each keyword the first value found wins. Because earlier settings win rather than being overridden, the most specific Host blocks belong at the top of the file and a Host * block at the bottom. The file must not be writable by anyone other than its owner or ssh refuses to use it.

Where this comes from

Cited
manual page ssh_config(5)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 110 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on Security

Practise LPIC-1 Exam 102-500