ssh config under cygwin












17















I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting.



Normal ssh command is not able to find the config while I try to connect: ssh host
If I explicitly specify config file, everything is OK: ssh -F ~/.ssh/config



I cannot found any option to set ssh client, something like /etc/ssh



Maybe ssh doesn't know where is my home folder? (I have set HOME environment variable to my home folder)










share|improve this question





























    17















    I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting.



    Normal ssh command is not able to find the config while I try to connect: ssh host
    If I explicitly specify config file, everything is OK: ssh -F ~/.ssh/config



    I cannot found any option to set ssh client, something like /etc/ssh



    Maybe ssh doesn't know where is my home folder? (I have set HOME environment variable to my home folder)










    share|improve this question



























      17












      17








      17


      5






      I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting.



      Normal ssh command is not able to find the config while I try to connect: ssh host
      If I explicitly specify config file, everything is OK: ssh -F ~/.ssh/config



      I cannot found any option to set ssh client, something like /etc/ssh



      Maybe ssh doesn't know where is my home folder? (I have set HOME environment variable to my home folder)










      share|improve this question
















      I have Cygwin installed on Windows 7. I made default install. I would like to use ssh config file (~/.ssh/config) to set host and options for connecting.



      Normal ssh command is not able to find the config while I try to connect: ssh host
      If I explicitly specify config file, everything is OK: ssh -F ~/.ssh/config



      I cannot found any option to set ssh client, something like /etc/ssh



      Maybe ssh doesn't know where is my home folder? (I have set HOME environment variable to my home folder)







      windows-7 bash ssh cygwin openssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 8 '14 at 21:03







      Hubidubi

















      asked Oct 26 '12 at 13:33









      HubidubiHubidubi

      193117




      193117






















          6 Answers
          6






          active

          oldest

          votes


















          16














          You have to run ssh-host-config first. It will generate a "ssh_config" file in /etc/.






          share|improve this answer































            4














            I had the same issue. I wanted to use ~/.ssh/config because I was already using that directory for other applications and didn't want to maintain 2 copies. So creating an /etc/ssh_config directory wasn't the ideal solution.



            As Fujimoto Youichi mentions, ssh looks at /etc/passwd for your home directory and not the $HOME environment variable.



            The current cygwin versions (I'm using 2.6) no longer creates /etc/passwd as part of the install. However, it is easy to create a new one:



                mkpasswd -c -p "$(cygpath -H)" > /etc/passwd




            • -c Adds the current user to the passwd file


            • -p "$(cygpath -H)" Adds your current home directory


            https://cygwin.com/cygwin-ug-net/mkpasswd.html has more details on the available flags.



            I haven't looked at the code, but ssh's preference seems to be:




            1. /etc/ssh_config

            2. ~/.ssh/config


            So if you only want to use the ssh configuration information from ~/.ssh/config, then be sure to delete /etc/ssh_config.



            Also, be sure to open a new cygwin terminal window after making changes, for them to become available.






            share|improve this answer


























            • seems it's been relocated to /etc/defaults/ssh_config

              – VeraKozya
              Feb 4 at 19:40



















            1














            ssh command looks for its config file under home directory from /etc/passwd.
            So setting HOME variable will not work.



            There are many ways but we can fix it by simply making a symlink as follows.



            ln -s ~ /home






            share|improve this answer































              0














              The other answers didn't work for me. I just created c:cygwin64etcssh_config and pasted in the following default / example file:



              # This is the ssh client system-wide configuration file.  See
              # ssh_config(5) for more information. This file provides defaults for
              # users, and the values can be changed in per-user configuration files
              # or on the command line.

              # Configuration data is parsed as follows:
              # 1. command line options
              # 2. user-specific file
              # 3. system-wide file
              # Any configuration value is only changed the first time it is set.
              # Thus, host-specific definitions should be at the beginning of the
              # configuration file, and defaults at the end.

              # Site-wide defaults for some commonly used options. For a comprehensive
              # list of available options, their meanings and defaults, please see the
              # ssh_config(5) man page.

              # Host *
              # ForwardAgent no
              # ForwardX11 no
              # RhostsRSAAuthentication no
              # RSAAuthentication yes
              # PasswordAuthentication yes
              # HostbasedAuthentication no
              # GSSAPIAuthentication no
              # GSSAPIDelegateCredentials no
              # BatchMode no
              # CheckHostIP yes
              # AddressFamily any
              # ConnectTimeout 0
              # StrictHostKeyChecking ask
              # IdentityFile ~/.ssh/identity
              # IdentityFile ~/.ssh/id_rsa
              # IdentityFile ~/.ssh/id_dsa
              # Port 22
              # Protocol 2,1
              # Cipher 3des
              # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
              # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
              # EscapeChar ~
              # Tunnel no
              # TunnelDevice any:any
              # PermitLocalCommand no
              # VisualHostKey no
              # ProxyCommand ssh -q -W %h:%p gateway.example.com
              #
              #
              Host *
              Port 22


              Hope that helps the next person.






              share|improve this answer































                0














                According to the accepted answer, by use command to initialize:



                ssh-host-config


                You can also create empty /etc/ssh_config in Cygwin, which will work same.



                The /etc/ssh_config creating by ssh-host-config is also empty with all comment out lines.





                Reload SSH with new config:



                To effect config, you can just finish editing /etc/ssh_config without restart service.






                share|improve this answer





















                • 1





                  How does this differ from the accepted answer?

                  – Greenonline
                  Jun 15 '17 at 4:05











                • I can not comment on it to further explain the principle and how to effect the ssh config.

                  – Nick Tsai
                  Jun 15 '17 at 5:27











                • You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                  – Greenonline
                  Jun 15 '17 at 5:28











                • OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                  – Nick Tsai
                  Jun 15 '17 at 5:32



















                0














                Cygwin ssh expects the config to be in /home/$USER. But the home directory "~" in cygwin is C:/Users/$USER, indeed /home is empty. You can have both C:/Users/$USER/.ssh and /home/$USER/.ssh be valid paths, by creating a symlink:



                ln -s ~ /home/$USER





                share|improve this answer

























                  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
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f493270%2fssh-config-under-cygwin%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  6 Answers
                  6






                  active

                  oldest

                  votes








                  6 Answers
                  6






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  16














                  You have to run ssh-host-config first. It will generate a "ssh_config" file in /etc/.






                  share|improve this answer




























                    16














                    You have to run ssh-host-config first. It will generate a "ssh_config" file in /etc/.






                    share|improve this answer


























                      16












                      16








                      16







                      You have to run ssh-host-config first. It will generate a "ssh_config" file in /etc/.






                      share|improve this answer













                      You have to run ssh-host-config first. It will generate a "ssh_config" file in /etc/.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Oct 26 '12 at 14:30







                      user127350
































                          4














                          I had the same issue. I wanted to use ~/.ssh/config because I was already using that directory for other applications and didn't want to maintain 2 copies. So creating an /etc/ssh_config directory wasn't the ideal solution.



                          As Fujimoto Youichi mentions, ssh looks at /etc/passwd for your home directory and not the $HOME environment variable.



                          The current cygwin versions (I'm using 2.6) no longer creates /etc/passwd as part of the install. However, it is easy to create a new one:



                              mkpasswd -c -p "$(cygpath -H)" > /etc/passwd




                          • -c Adds the current user to the passwd file


                          • -p "$(cygpath -H)" Adds your current home directory


                          https://cygwin.com/cygwin-ug-net/mkpasswd.html has more details on the available flags.



                          I haven't looked at the code, but ssh's preference seems to be:




                          1. /etc/ssh_config

                          2. ~/.ssh/config


                          So if you only want to use the ssh configuration information from ~/.ssh/config, then be sure to delete /etc/ssh_config.



                          Also, be sure to open a new cygwin terminal window after making changes, for them to become available.






                          share|improve this answer


























                          • seems it's been relocated to /etc/defaults/ssh_config

                            – VeraKozya
                            Feb 4 at 19:40
















                          4














                          I had the same issue. I wanted to use ~/.ssh/config because I was already using that directory for other applications and didn't want to maintain 2 copies. So creating an /etc/ssh_config directory wasn't the ideal solution.



                          As Fujimoto Youichi mentions, ssh looks at /etc/passwd for your home directory and not the $HOME environment variable.



                          The current cygwin versions (I'm using 2.6) no longer creates /etc/passwd as part of the install. However, it is easy to create a new one:



                              mkpasswd -c -p "$(cygpath -H)" > /etc/passwd




                          • -c Adds the current user to the passwd file


                          • -p "$(cygpath -H)" Adds your current home directory


                          https://cygwin.com/cygwin-ug-net/mkpasswd.html has more details on the available flags.



                          I haven't looked at the code, but ssh's preference seems to be:




                          1. /etc/ssh_config

                          2. ~/.ssh/config


                          So if you only want to use the ssh configuration information from ~/.ssh/config, then be sure to delete /etc/ssh_config.



                          Also, be sure to open a new cygwin terminal window after making changes, for them to become available.






                          share|improve this answer


























                          • seems it's been relocated to /etc/defaults/ssh_config

                            – VeraKozya
                            Feb 4 at 19:40














                          4












                          4








                          4







                          I had the same issue. I wanted to use ~/.ssh/config because I was already using that directory for other applications and didn't want to maintain 2 copies. So creating an /etc/ssh_config directory wasn't the ideal solution.



                          As Fujimoto Youichi mentions, ssh looks at /etc/passwd for your home directory and not the $HOME environment variable.



                          The current cygwin versions (I'm using 2.6) no longer creates /etc/passwd as part of the install. However, it is easy to create a new one:



                              mkpasswd -c -p "$(cygpath -H)" > /etc/passwd




                          • -c Adds the current user to the passwd file


                          • -p "$(cygpath -H)" Adds your current home directory


                          https://cygwin.com/cygwin-ug-net/mkpasswd.html has more details on the available flags.



                          I haven't looked at the code, but ssh's preference seems to be:




                          1. /etc/ssh_config

                          2. ~/.ssh/config


                          So if you only want to use the ssh configuration information from ~/.ssh/config, then be sure to delete /etc/ssh_config.



                          Also, be sure to open a new cygwin terminal window after making changes, for them to become available.






                          share|improve this answer















                          I had the same issue. I wanted to use ~/.ssh/config because I was already using that directory for other applications and didn't want to maintain 2 copies. So creating an /etc/ssh_config directory wasn't the ideal solution.



                          As Fujimoto Youichi mentions, ssh looks at /etc/passwd for your home directory and not the $HOME environment variable.



                          The current cygwin versions (I'm using 2.6) no longer creates /etc/passwd as part of the install. However, it is easy to create a new one:



                              mkpasswd -c -p "$(cygpath -H)" > /etc/passwd




                          • -c Adds the current user to the passwd file


                          • -p "$(cygpath -H)" Adds your current home directory


                          https://cygwin.com/cygwin-ug-net/mkpasswd.html has more details on the available flags.



                          I haven't looked at the code, but ssh's preference seems to be:




                          1. /etc/ssh_config

                          2. ~/.ssh/config


                          So if you only want to use the ssh configuration information from ~/.ssh/config, then be sure to delete /etc/ssh_config.



                          Also, be sure to open a new cygwin terminal window after making changes, for them to become available.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 15 '16 at 1:53

























                          answered Nov 14 '16 at 18:34









                          kyleuskyleus

                          1413




                          1413













                          • seems it's been relocated to /etc/defaults/ssh_config

                            – VeraKozya
                            Feb 4 at 19:40



















                          • seems it's been relocated to /etc/defaults/ssh_config

                            – VeraKozya
                            Feb 4 at 19:40

















                          seems it's been relocated to /etc/defaults/ssh_config

                          – VeraKozya
                          Feb 4 at 19:40





                          seems it's been relocated to /etc/defaults/ssh_config

                          – VeraKozya
                          Feb 4 at 19:40











                          1














                          ssh command looks for its config file under home directory from /etc/passwd.
                          So setting HOME variable will not work.



                          There are many ways but we can fix it by simply making a symlink as follows.



                          ln -s ~ /home






                          share|improve this answer




























                            1














                            ssh command looks for its config file under home directory from /etc/passwd.
                            So setting HOME variable will not work.



                            There are many ways but we can fix it by simply making a symlink as follows.



                            ln -s ~ /home






                            share|improve this answer


























                              1












                              1








                              1







                              ssh command looks for its config file under home directory from /etc/passwd.
                              So setting HOME variable will not work.



                              There are many ways but we can fix it by simply making a symlink as follows.



                              ln -s ~ /home






                              share|improve this answer













                              ssh command looks for its config file under home directory from /etc/passwd.
                              So setting HOME variable will not work.



                              There are many ways but we can fix it by simply making a symlink as follows.



                              ln -s ~ /home







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 3 '15 at 7:10









                              Fujimoto YouichiFujimoto Youichi

                              1112




                              1112























                                  0














                                  The other answers didn't work for me. I just created c:cygwin64etcssh_config and pasted in the following default / example file:



                                  # This is the ssh client system-wide configuration file.  See
                                  # ssh_config(5) for more information. This file provides defaults for
                                  # users, and the values can be changed in per-user configuration files
                                  # or on the command line.

                                  # Configuration data is parsed as follows:
                                  # 1. command line options
                                  # 2. user-specific file
                                  # 3. system-wide file
                                  # Any configuration value is only changed the first time it is set.
                                  # Thus, host-specific definitions should be at the beginning of the
                                  # configuration file, and defaults at the end.

                                  # Site-wide defaults for some commonly used options. For a comprehensive
                                  # list of available options, their meanings and defaults, please see the
                                  # ssh_config(5) man page.

                                  # Host *
                                  # ForwardAgent no
                                  # ForwardX11 no
                                  # RhostsRSAAuthentication no
                                  # RSAAuthentication yes
                                  # PasswordAuthentication yes
                                  # HostbasedAuthentication no
                                  # GSSAPIAuthentication no
                                  # GSSAPIDelegateCredentials no
                                  # BatchMode no
                                  # CheckHostIP yes
                                  # AddressFamily any
                                  # ConnectTimeout 0
                                  # StrictHostKeyChecking ask
                                  # IdentityFile ~/.ssh/identity
                                  # IdentityFile ~/.ssh/id_rsa
                                  # IdentityFile ~/.ssh/id_dsa
                                  # Port 22
                                  # Protocol 2,1
                                  # Cipher 3des
                                  # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
                                  # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
                                  # EscapeChar ~
                                  # Tunnel no
                                  # TunnelDevice any:any
                                  # PermitLocalCommand no
                                  # VisualHostKey no
                                  # ProxyCommand ssh -q -W %h:%p gateway.example.com
                                  #
                                  #
                                  Host *
                                  Port 22


                                  Hope that helps the next person.






                                  share|improve this answer




























                                    0














                                    The other answers didn't work for me. I just created c:cygwin64etcssh_config and pasted in the following default / example file:



                                    # This is the ssh client system-wide configuration file.  See
                                    # ssh_config(5) for more information. This file provides defaults for
                                    # users, and the values can be changed in per-user configuration files
                                    # or on the command line.

                                    # Configuration data is parsed as follows:
                                    # 1. command line options
                                    # 2. user-specific file
                                    # 3. system-wide file
                                    # Any configuration value is only changed the first time it is set.
                                    # Thus, host-specific definitions should be at the beginning of the
                                    # configuration file, and defaults at the end.

                                    # Site-wide defaults for some commonly used options. For a comprehensive
                                    # list of available options, their meanings and defaults, please see the
                                    # ssh_config(5) man page.

                                    # Host *
                                    # ForwardAgent no
                                    # ForwardX11 no
                                    # RhostsRSAAuthentication no
                                    # RSAAuthentication yes
                                    # PasswordAuthentication yes
                                    # HostbasedAuthentication no
                                    # GSSAPIAuthentication no
                                    # GSSAPIDelegateCredentials no
                                    # BatchMode no
                                    # CheckHostIP yes
                                    # AddressFamily any
                                    # ConnectTimeout 0
                                    # StrictHostKeyChecking ask
                                    # IdentityFile ~/.ssh/identity
                                    # IdentityFile ~/.ssh/id_rsa
                                    # IdentityFile ~/.ssh/id_dsa
                                    # Port 22
                                    # Protocol 2,1
                                    # Cipher 3des
                                    # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
                                    # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
                                    # EscapeChar ~
                                    # Tunnel no
                                    # TunnelDevice any:any
                                    # PermitLocalCommand no
                                    # VisualHostKey no
                                    # ProxyCommand ssh -q -W %h:%p gateway.example.com
                                    #
                                    #
                                    Host *
                                    Port 22


                                    Hope that helps the next person.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      The other answers didn't work for me. I just created c:cygwin64etcssh_config and pasted in the following default / example file:



                                      # This is the ssh client system-wide configuration file.  See
                                      # ssh_config(5) for more information. This file provides defaults for
                                      # users, and the values can be changed in per-user configuration files
                                      # or on the command line.

                                      # Configuration data is parsed as follows:
                                      # 1. command line options
                                      # 2. user-specific file
                                      # 3. system-wide file
                                      # Any configuration value is only changed the first time it is set.
                                      # Thus, host-specific definitions should be at the beginning of the
                                      # configuration file, and defaults at the end.

                                      # Site-wide defaults for some commonly used options. For a comprehensive
                                      # list of available options, their meanings and defaults, please see the
                                      # ssh_config(5) man page.

                                      # Host *
                                      # ForwardAgent no
                                      # ForwardX11 no
                                      # RhostsRSAAuthentication no
                                      # RSAAuthentication yes
                                      # PasswordAuthentication yes
                                      # HostbasedAuthentication no
                                      # GSSAPIAuthentication no
                                      # GSSAPIDelegateCredentials no
                                      # BatchMode no
                                      # CheckHostIP yes
                                      # AddressFamily any
                                      # ConnectTimeout 0
                                      # StrictHostKeyChecking ask
                                      # IdentityFile ~/.ssh/identity
                                      # IdentityFile ~/.ssh/id_rsa
                                      # IdentityFile ~/.ssh/id_dsa
                                      # Port 22
                                      # Protocol 2,1
                                      # Cipher 3des
                                      # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
                                      # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
                                      # EscapeChar ~
                                      # Tunnel no
                                      # TunnelDevice any:any
                                      # PermitLocalCommand no
                                      # VisualHostKey no
                                      # ProxyCommand ssh -q -W %h:%p gateway.example.com
                                      #
                                      #
                                      Host *
                                      Port 22


                                      Hope that helps the next person.






                                      share|improve this answer













                                      The other answers didn't work for me. I just created c:cygwin64etcssh_config and pasted in the following default / example file:



                                      # This is the ssh client system-wide configuration file.  See
                                      # ssh_config(5) for more information. This file provides defaults for
                                      # users, and the values can be changed in per-user configuration files
                                      # or on the command line.

                                      # Configuration data is parsed as follows:
                                      # 1. command line options
                                      # 2. user-specific file
                                      # 3. system-wide file
                                      # Any configuration value is only changed the first time it is set.
                                      # Thus, host-specific definitions should be at the beginning of the
                                      # configuration file, and defaults at the end.

                                      # Site-wide defaults for some commonly used options. For a comprehensive
                                      # list of available options, their meanings and defaults, please see the
                                      # ssh_config(5) man page.

                                      # Host *
                                      # ForwardAgent no
                                      # ForwardX11 no
                                      # RhostsRSAAuthentication no
                                      # RSAAuthentication yes
                                      # PasswordAuthentication yes
                                      # HostbasedAuthentication no
                                      # GSSAPIAuthentication no
                                      # GSSAPIDelegateCredentials no
                                      # BatchMode no
                                      # CheckHostIP yes
                                      # AddressFamily any
                                      # ConnectTimeout 0
                                      # StrictHostKeyChecking ask
                                      # IdentityFile ~/.ssh/identity
                                      # IdentityFile ~/.ssh/id_rsa
                                      # IdentityFile ~/.ssh/id_dsa
                                      # Port 22
                                      # Protocol 2,1
                                      # Cipher 3des
                                      # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
                                      # MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
                                      # EscapeChar ~
                                      # Tunnel no
                                      # TunnelDevice any:any
                                      # PermitLocalCommand no
                                      # VisualHostKey no
                                      # ProxyCommand ssh -q -W %h:%p gateway.example.com
                                      #
                                      #
                                      Host *
                                      Port 22


                                      Hope that helps the next person.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Apr 7 '16 at 19:56









                                      Ryan ShillingtonRyan Shillington

                                      21025




                                      21025























                                          0














                                          According to the accepted answer, by use command to initialize:



                                          ssh-host-config


                                          You can also create empty /etc/ssh_config in Cygwin, which will work same.



                                          The /etc/ssh_config creating by ssh-host-config is also empty with all comment out lines.





                                          Reload SSH with new config:



                                          To effect config, you can just finish editing /etc/ssh_config without restart service.






                                          share|improve this answer





















                                          • 1





                                            How does this differ from the accepted answer?

                                            – Greenonline
                                            Jun 15 '17 at 4:05











                                          • I can not comment on it to further explain the principle and how to effect the ssh config.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:27











                                          • You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                            – Greenonline
                                            Jun 15 '17 at 5:28











                                          • OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:32
















                                          0














                                          According to the accepted answer, by use command to initialize:



                                          ssh-host-config


                                          You can also create empty /etc/ssh_config in Cygwin, which will work same.



                                          The /etc/ssh_config creating by ssh-host-config is also empty with all comment out lines.





                                          Reload SSH with new config:



                                          To effect config, you can just finish editing /etc/ssh_config without restart service.






                                          share|improve this answer





















                                          • 1





                                            How does this differ from the accepted answer?

                                            – Greenonline
                                            Jun 15 '17 at 4:05











                                          • I can not comment on it to further explain the principle and how to effect the ssh config.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:27











                                          • You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                            – Greenonline
                                            Jun 15 '17 at 5:28











                                          • OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:32














                                          0












                                          0








                                          0







                                          According to the accepted answer, by use command to initialize:



                                          ssh-host-config


                                          You can also create empty /etc/ssh_config in Cygwin, which will work same.



                                          The /etc/ssh_config creating by ssh-host-config is also empty with all comment out lines.





                                          Reload SSH with new config:



                                          To effect config, you can just finish editing /etc/ssh_config without restart service.






                                          share|improve this answer















                                          According to the accepted answer, by use command to initialize:



                                          ssh-host-config


                                          You can also create empty /etc/ssh_config in Cygwin, which will work same.



                                          The /etc/ssh_config creating by ssh-host-config is also empty with all comment out lines.





                                          Reload SSH with new config:



                                          To effect config, you can just finish editing /etc/ssh_config without restart service.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Jun 29 '17 at 5:55

























                                          answered Jun 15 '17 at 3:38









                                          Nick TsaiNick Tsai

                                          1013




                                          1013








                                          • 1





                                            How does this differ from the accepted answer?

                                            – Greenonline
                                            Jun 15 '17 at 4:05











                                          • I can not comment on it to further explain the principle and how to effect the ssh config.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:27











                                          • You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                            – Greenonline
                                            Jun 15 '17 at 5:28











                                          • OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:32














                                          • 1





                                            How does this differ from the accepted answer?

                                            – Greenonline
                                            Jun 15 '17 at 4:05











                                          • I can not comment on it to further explain the principle and how to effect the ssh config.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:27











                                          • You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                            – Greenonline
                                            Jun 15 '17 at 5:28











                                          • OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                            – Nick Tsai
                                            Jun 15 '17 at 5:32








                                          1




                                          1





                                          How does this differ from the accepted answer?

                                          – Greenonline
                                          Jun 15 '17 at 4:05





                                          How does this differ from the accepted answer?

                                          – Greenonline
                                          Jun 15 '17 at 4:05













                                          I can not comment on it to further explain the principle and how to effect the ssh config.

                                          – Nick Tsai
                                          Jun 15 '17 at 5:27





                                          I can not comment on it to further explain the principle and how to effect the ssh config.

                                          – Nick Tsai
                                          Jun 15 '17 at 5:27













                                          You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                          – Greenonline
                                          Jun 15 '17 at 5:28





                                          You need to earn some reputation first. Try editing some badly formatted posts, or answering an unanswered question :-)

                                          – Greenonline
                                          Jun 15 '17 at 5:28













                                          OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                          – Nick Tsai
                                          Jun 15 '17 at 5:32





                                          OK! I posted this answer because after checking the accepted answer, I did more survey on it. Thank you.

                                          – Nick Tsai
                                          Jun 15 '17 at 5:32











                                          0














                                          Cygwin ssh expects the config to be in /home/$USER. But the home directory "~" in cygwin is C:/Users/$USER, indeed /home is empty. You can have both C:/Users/$USER/.ssh and /home/$USER/.ssh be valid paths, by creating a symlink:



                                          ln -s ~ /home/$USER





                                          share|improve this answer






























                                            0














                                            Cygwin ssh expects the config to be in /home/$USER. But the home directory "~" in cygwin is C:/Users/$USER, indeed /home is empty. You can have both C:/Users/$USER/.ssh and /home/$USER/.ssh be valid paths, by creating a symlink:



                                            ln -s ~ /home/$USER





                                            share|improve this answer




























                                              0












                                              0








                                              0







                                              Cygwin ssh expects the config to be in /home/$USER. But the home directory "~" in cygwin is C:/Users/$USER, indeed /home is empty. You can have both C:/Users/$USER/.ssh and /home/$USER/.ssh be valid paths, by creating a symlink:



                                              ln -s ~ /home/$USER





                                              share|improve this answer















                                              Cygwin ssh expects the config to be in /home/$USER. But the home directory "~" in cygwin is C:/Users/$USER, indeed /home is empty. You can have both C:/Users/$USER/.ssh and /home/$USER/.ssh be valid paths, by creating a symlink:



                                              ln -s ~ /home/$USER






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Jan 10 at 14:59

























                                              answered Jan 9 at 10:09









                                              MapadMapad

                                              1012




                                              1012






























                                                  draft saved

                                                  draft discarded




















































                                                  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%2f493270%2fssh-config-under-cygwin%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

                                                  Plaza Victoria

                                                  In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                                                  How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...