Configuring Cygwin with OpenSSH and OpenSSL

Complete these instructions to configure Cygwin with OpenSSH and OpenSSL.

Procedure

  1. Open the cygwin.bat file located in the  C:\cygwin\ directory and edit the script by adding the set command as shown below:
    @echo off
    set CYGWIN='binmode mintty ntsec'
    C:
    chdir \cygwin\bin
    bash --login -i
    
  2. Save and close the cygwin.bat file.
  3. Determine the 8-character name of the program files (or program files(x86)) directory that contains the RocketSoftware\D3\D3Programs directory.
    • On a 32-bit system, this should be progra~1, but it is recommended that you verify this explicitly.

    • On a 64-bit system, this should be progra~2, but it is recommended that you verify this explicitly.

  4. If you intend to use d3tcl instead of telnet, create a bat file named d3.bat in the C:\cygwin\ directory. The contents of the bat file on a 32-bit system should be as shown below (note that the progra~1 portion of the directory should be the name you determined in step 3).
    @echo off
    c:\progra~1\RocketSoftware\D3\D3Programs\D3Tcl -i cygwin -s -u dm
    
  5. Save and close the d3.bat file.
  6. Open a command prompt, navigate to the cygwin directory and run cygwin. For example:
    C:\Users\jsmith> cd \cygwin
     
    C:\cygwin> cygwin
     
    jsmith@jsmith-pc2 ~]
     
    $
    

    Note how this opens a unix-like shell.

  7. Test some Cygwin commands (for example, pwd or ls /bin) to ensure it is functioning properly.
  8. Run the ssh-host-config command to Install the SSH daemon:
    $ ssh-host-config
    
  9. A series of prompts displays to which you respond as shown in the table below. Note that this list of prompts may not be all-inclusive. As such, if any other prompts display (that are not listed below), please respond accordingly.
    Prompt Response
    Should privilege separation be used? (yes/no) yes
    Do you want to install sshd as a service?

    (Say "no" if it is already installed as a service) (yes/no)

    yes
    Enter the value of CYGWIN for the daemon: [] binmode mintty ntsec
    Do you want to use a different name? (yes/no) no
    Please enter the password for user cyg_server': Type the password you want to use, making sure it meets the minimum requirements.
    Reenter: Enter the password from above again.
  10. Open the Windows Service Control Manager and start the CYGWIN sshd service.