Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 12 down vote accepted

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

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

The other answers didn't work for me. I just created c:\cygwin64\etc\ssh_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,,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p
Host *
    Port 22

Hope that helps the next person.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.