102-350 · Question #110
Which configuration file would you edit to change default options for outbound ssh sessions?
The correct answer is D. /etc/ssh/ssh_config. See the full explanation below for the reasoning.
Question
Options
- A/etc/ssh/sshd_config
- B/etc/ssh/ssh
- C/etc/ssh/client
- D/etc/ssh/ssh_config
- E/etc/ssh/ssh_client
How the community answered
(30 responses)- A10% (3)
- B7% (2)
- D80% (24)
- E3% (1)
Community Discussion
7D is your answer, and here is the sticky trick to never forget it: think "ssh_config is for the CLIENT, sshd_config is for the DAEMON." The D in sshd stands for Daemon, meaning the server side that listens for incoming connections, so A is out immediately. The correct file, /etc/ssh/ssh_config, is what the ssh CLIENT reads before making any outbound connection, letting you set defaults like preferred port, user, or identity file for every session you initiate. Options B, C, and E are simply made-up filenames that do not exist in a standard OpenSSH installation, so you can eliminate them the moment you spot they break the real naming pattern. Lock it in with the rhyme: "ssh_config, outbound fact, sshd_config, inbound act."
D is right. Does that config apply per-user too, or only system-wide?
Saw this one and almost second-guessed myself, but sshd_config is the server side, so D it is.
Good catch, and lock it in forever with D for Daemon, D for Destination, because sshd_config is always on the server side WAITING for clients to arrive, never the one doing the traveling.
D is right, though "outbound sessions" just means client, not server, so ignore A.
Has to be E, /etc/ssh/ssh_client, because the naming convention follows the client-side distinction the same way sshd_config is for the daemon, so logically the client config carries the _client suffix to separate it cleanly from any server-side directives. I have seen people trip on D but ssh_config without that suffix looks too generic to me, and on my boxes the client behavior always felt anchored to that ssh_client path when I was tracing option inheritance with ssh -vvv.
Hey Thiago, the trick I use is "the daemon gets the D in sshd, the client keeps it clean with just ssh_config, no suffix needed," so D is your answer, /etc/ssh/ssh_config, because that file has been the system-wide client config since forever and ssh_client simply does not exist as a real path.