To verify if Cygwin (cygrunsrv) is installed properly, run C:\cygwin\Cygwin.bat, and execute the following command:
cygrunsrv -h
If Cygwin is installed properly, then all the Cygwin help options are displayed on the screen. However, if this command returns an error message, then you may have to reinstall Cygwin.
To configure the SSHD service, run C:\cygwin\Cygwin.bat, and execute the following command:
ssh-host-config
After running the command, you are prompted the following questions:
- Query: Should privilege separation be used? : yes
- Query: New local account 'sshd'? : yes
- Query: Do you want to install sshd as a service?
- Query: : yes
- Query: Enter the value of CYGWIN for the deamon: [] binmode ntsec
- Query: Do you want to use a different name? (yes/no) yes/no
At this point, if you want to use the same name, that is cyg_server, enter no. You are then prompted the following questions:
- Query: Create new privileged user account 'cyg_server'? (yes/no) yes
- Query: Please enter the password:
- Query: Renter:
However, if you want to use a different name, enter yes. You are then prompted the following questions:
- Query: Enter the new user name: cyg_server1
- Query: Reenter: cyg_server1
- Query: Create new privileged user account 'cyg_server1'? (yes/no) yes
- Query: Please enter the password:
- Query: Reenter:
If the configuration is successful, you will see the following message:
Host configuration finished. Have fun!
echo $HOME
in Cygwin? The ssh config will be loaded from~/.ssh/config
, which may be different then%HOME/.ssh/config
.C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
),echo $HOME
shows "/home/Vince" (real directory is C:\cygwin64\home\Vince). If I run C:\cygwin64\Cygwin.bat (runsbash --login -i
), it shows "/cygdrive/c/Users/Vince". I don't understand why MinTTY does something different. Both commands effectively run bash as an interactive login shell. The bash man page says that it uses the value of theHOME
variable when performing tilde expansion.~/.ssh/config
, but tilde expansion is performed by the bash shell that isn't running.rm -rf ~/.ssh
ln -s /cygdrive/c/Users/Vince/.ssh
/home/me
->/cygdrive/c/Users/me
. I was trying to get it to work the proper way :/