Are host configurations in the SSH config merged?What's the difference between Host and HostName in SSH Config?SSH Config setting default user for multiple hosts under the same domain + aliasesHow can I make OSX terminal tab names the same as .ssh/config host aliasesSSH 'Host key verification failed' errorOpenSSH ~/.ssh/config host-specific overrides not workingHow can I force SSH to ignore the IdentityFile listed in “Host *” for one specific host?ssh config with sudoWhat may cause .ssh/config changes to be ignoredSSH is not picking a more specific match from ~/.ssh/configAliases in .ssh/config

Soda water first stored in refrigerator and then outside

How important is it for multiple POVs to run chronologically?

Why do Martians have to wear space helmets?

Will Jimmy fall off his platform?

How do amateur satellites stay consistently in the amateur-sat bands acoss the globe?

Gory anime with pink haired girl escaping an asylum

Wearing special clothes in public while in niddah- isn't this a lack of tznius?

Howto display unicode character u2026 in terminal mode in emacs

Bringing coumarin-containing liquor into the USA

What is the maximum amount of diamond in one Minecraft game?

How did Einstein know the speed of light was constant?

PhD: When to quit and move on?

How would a sea turtle end up on its back?

Groups where no elements commute except for the trivial cases

Can I Ready an attack action to trigger when the target Blinks back to the Material plane?

Initializing variables in an "if" statement

What do I need to see before Spider-Man: Far From Home?

What is this airplane with small wings at different angles seen at Paphos Airport?

Shipped package arrived - didn't order, possible scam?

Do I need transit visa for Dublin?

What is the fundamental difference between catching whales and hunting other animals?

Is this car delivery via Ebay Motors on Craigslist a scam?

How to delete multiple process id of a single process?

I'm feeling like my character doesn't fit the campaign



Are host configurations in the SSH config merged?


What's the difference between Host and HostName in SSH Config?SSH Config setting default user for multiple hosts under the same domain + aliasesHow can I make OSX terminal tab names the same as .ssh/config host aliasesSSH 'Host key verification failed' errorOpenSSH ~/.ssh/config host-specific overrides not workingHow can I force SSH to ignore the IdentityFile listed in “Host *” for one specific host?ssh config with sudoWhat may cause .ssh/config changes to be ignoredSSH is not picking a more specific match from ~/.ssh/configAliases in .ssh/config






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I have the following generic host configuration in my .ssh/ssh_config:



Host *
ConnectTimeout 5
ServerAliveInterval 5
ServerAliveCountMax 12


I also have some specific configurations. For example the following alias:



Host work-server-1
Hostname a.b.c.d

Host work-server-2
Hostname i.j.k.l


Now, my question: when logging into the host work-server-1, will SSH also use the ConnectTimeout, ServerAliveInterval and ServerAliveCountMax setting as defined in the Host * entry?










share|improve this question









New contributor



Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I have the following generic host configuration in my .ssh/ssh_config:



    Host *
    ConnectTimeout 5
    ServerAliveInterval 5
    ServerAliveCountMax 12


    I also have some specific configurations. For example the following alias:



    Host work-server-1
    Hostname a.b.c.d

    Host work-server-2
    Hostname i.j.k.l


    Now, my question: when logging into the host work-server-1, will SSH also use the ConnectTimeout, ServerAliveInterval and ServerAliveCountMax setting as defined in the Host * entry?










    share|improve this question









    New contributor



    Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      2












      2








      2


      1






      I have the following generic host configuration in my .ssh/ssh_config:



      Host *
      ConnectTimeout 5
      ServerAliveInterval 5
      ServerAliveCountMax 12


      I also have some specific configurations. For example the following alias:



      Host work-server-1
      Hostname a.b.c.d

      Host work-server-2
      Hostname i.j.k.l


      Now, my question: when logging into the host work-server-1, will SSH also use the ConnectTimeout, ServerAliveInterval and ServerAliveCountMax setting as defined in the Host * entry?










      share|improve this question









      New contributor



      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have the following generic host configuration in my .ssh/ssh_config:



      Host *
      ConnectTimeout 5
      ServerAliveInterval 5
      ServerAliveCountMax 12


      I also have some specific configurations. For example the following alias:



      Host work-server-1
      Hostname a.b.c.d

      Host work-server-2
      Hostname i.j.k.l


      Now, my question: when logging into the host work-server-1, will SSH also use the ConnectTimeout, ServerAliveInterval and ServerAliveCountMax setting as defined in the Host * entry?







      linux networking ssh openssh






      share|improve this question









      New contributor



      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 7 hours ago









      Martin Prikryl

      12.2k4 gold badges37 silver badges85 bronze badges




      12.2k4 gold badges37 silver badges85 bronze badges






      New contributor



      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      PritzlPritzl

      132 bronze badges




      132 bronze badges




      New contributor



      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Pritzl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          4














          For each directive, the first relevant occurrence in the ssh_config is used.



          Quoting man page for ssh_config:




          For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. ...



          Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.





          So with the configuration file below:



          • For all hosts, ServerAliveInterval 1 is always used, 4 and 7 are never used, not even for work.


          • ConnectTimeout is 2 for work, for other hosts it's 3.

          • For all hosts, the ServerAliveCountMax is 5, the work-specific value 6 is never used, not even for work.

          ServerAliveInterval 1

          Host work
          ConnectTimeout 2

          Host *
          ConnectTimeout 3
          ServerAliveInterval 4
          ServerAliveCountMax 5

          Host work
          ServerAliveCountMax 6
          ServerAliveInterval 7





          share|improve this answer




















          • 1





            Much obliged Martin.

            – Pritzl
            7 hours ago













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "3"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Pritzl is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1456255%2fare-host-configurations-in-the-ssh-config-merged%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          4














          For each directive, the first relevant occurrence in the ssh_config is used.



          Quoting man page for ssh_config:




          For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. ...



          Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.





          So with the configuration file below:



          • For all hosts, ServerAliveInterval 1 is always used, 4 and 7 are never used, not even for work.


          • ConnectTimeout is 2 for work, for other hosts it's 3.

          • For all hosts, the ServerAliveCountMax is 5, the work-specific value 6 is never used, not even for work.

          ServerAliveInterval 1

          Host work
          ConnectTimeout 2

          Host *
          ConnectTimeout 3
          ServerAliveInterval 4
          ServerAliveCountMax 5

          Host work
          ServerAliveCountMax 6
          ServerAliveInterval 7





          share|improve this answer




















          • 1





            Much obliged Martin.

            – Pritzl
            7 hours ago















          4














          For each directive, the first relevant occurrence in the ssh_config is used.



          Quoting man page for ssh_config:




          For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. ...



          Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.





          So with the configuration file below:



          • For all hosts, ServerAliveInterval 1 is always used, 4 and 7 are never used, not even for work.


          • ConnectTimeout is 2 for work, for other hosts it's 3.

          • For all hosts, the ServerAliveCountMax is 5, the work-specific value 6 is never used, not even for work.

          ServerAliveInterval 1

          Host work
          ConnectTimeout 2

          Host *
          ConnectTimeout 3
          ServerAliveInterval 4
          ServerAliveCountMax 5

          Host work
          ServerAliveCountMax 6
          ServerAliveInterval 7





          share|improve this answer




















          • 1





            Much obliged Martin.

            – Pritzl
            7 hours ago













          4












          4








          4







          For each directive, the first relevant occurrence in the ssh_config is used.



          Quoting man page for ssh_config:




          For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. ...



          Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.





          So with the configuration file below:



          • For all hosts, ServerAliveInterval 1 is always used, 4 and 7 are never used, not even for work.


          • ConnectTimeout is 2 for work, for other hosts it's 3.

          • For all hosts, the ServerAliveCountMax is 5, the work-specific value 6 is never used, not even for work.

          ServerAliveInterval 1

          Host work
          ConnectTimeout 2

          Host *
          ConnectTimeout 3
          ServerAliveInterval 4
          ServerAliveCountMax 5

          Host work
          ServerAliveCountMax 6
          ServerAliveInterval 7





          share|improve this answer















          For each directive, the first relevant occurrence in the ssh_config is used.



          Quoting man page for ssh_config:




          For each parameter, the first obtained value will be used. The configuration files contain sections separated by Host specifications, and that section is only applied for hosts that match one of the patterns given in the specification. ...



          Since the first obtained value for each parameter is used, more host-specific declarations should be given near the beginning of the file, and general defaults at the end.





          So with the configuration file below:



          • For all hosts, ServerAliveInterval 1 is always used, 4 and 7 are never used, not even for work.


          • ConnectTimeout is 2 for work, for other hosts it's 3.

          • For all hosts, the ServerAliveCountMax is 5, the work-specific value 6 is never used, not even for work.

          ServerAliveInterval 1

          Host work
          ConnectTimeout 2

          Host *
          ConnectTimeout 3
          ServerAliveInterval 4
          ServerAliveCountMax 5

          Host work
          ServerAliveCountMax 6
          ServerAliveInterval 7






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 6 hours ago

























          answered 7 hours ago









          Martin PrikrylMartin Prikryl

          12.2k4 gold badges37 silver badges85 bronze badges




          12.2k4 gold badges37 silver badges85 bronze badges







          • 1





            Much obliged Martin.

            – Pritzl
            7 hours ago












          • 1





            Much obliged Martin.

            – Pritzl
            7 hours ago







          1




          1





          Much obliged Martin.

          – Pritzl
          7 hours ago





          Much obliged Martin.

          – Pritzl
          7 hours ago










          Pritzl is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Pritzl is a new contributor. Be nice, and check out our Code of Conduct.












          Pritzl is a new contributor. Be nice, and check out our Code of Conduct.











          Pritzl is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1456255%2fare-host-configurations-in-the-ssh-config-merged%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її