What is the difference between ssh configuration file settings:
- At the top (global) level
- In a
Host *
scope?
Assuming there is a difference, in which cases would each be preferred?
configurationssh
What is the difference between ssh configuration file settings:
Host *
scope?Assuming there is a difference, in which cases would each be preferred?
Best Answer
The SSH configuration documentation touches on this indirectly:
So settings in the “top” level can’t be overridden, whereas settings in
Host *
will be overridden by any setting defined before that section (in the “top” level, or in a section matching the target host).This answers “in which cases would each be preferred”: the “top” level should be used for settings which shouldn’t be overridden, and the
Host *
section, which should come last, should be used for default settings.