Skip to content

Instantly share code, notes, and snippets.

@iahu
Forked from roxlu/install_cygwin_sshd.txt
Created May 26, 2021 02:37
Show Gist options
  • Save iahu/4f9fcd01ef2c8c7dfa152b0937c86c20 to your computer and use it in GitHub Desktop.
Save iahu/4f9fcd01ef2c8c7dfa152b0937c86c20 to your computer and use it in GitHub Desktop.

Revisions

  1. roxlu renamed this gist Feb 26, 2013. 1 changed file with 29 additions and 21 deletions.
    50 changes: 29 additions & 21 deletions install_cygwin_sshd.md → install_cygwin_sshd.txt
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,21 @@
    Installing CYGWIN with SSHD
    ===========================
    - Download cygwin setup.exe from http://www.cygwin.com
    - Execute setup.exe
    - Install from internet
    - Root directory: `c:\cygwin` + all users
    - Local package directory: use default value
    - Select a mirror to download files from
    - Select these packages:
    - editors > xemacs 21.4.22-1
    - net > openssh 6.1-p
    - admin > cygrunsrv 1.40-2
    Installing CYGWIN with SSH
    1) Download cygwin setup.exe from http://www.cygwin.com
    - Execute setup.exe
    - Install from internet
    - Root directory: `c:\cygwin` + all users
    - Local package directory: use default value
    - Select a mirror to download files from
    - Select these packages:
    - editors > xemacs 21.4.22-1
    - net > openssh 6.1-p
    - admin > cygrunsrv 1.40-2
    - Click continue
    - When everything is installed configure SSHD


    - Configure SSHD
    2) Configure SSHD
    - open a cygwin terminal: start > RIGHT MOUSE ON "Cygwin terminal" AND "RUN AS ADMINISTRATOR"
    - `$ ssh-host-config`
    - $ ssh-host-config
    - Are you sure you want to continue: YES
    - You have the required privileges: YES
    - Overwrite existing /etc/ssh_config: YES
    @@ -25,19 +24,25 @@ Installing CYGWIN with SSHD
    - Do you want to install 'sshd' as a service: YES
    - name CYGWIN: just press enter
    - Do you want to use a different name: no

    +++ you can skip this ++
    - Create new privileged user account (cyg_server): YES
    - enter password
    - reenter password
    +++ end of skip ++

    - Add a SSHD account
    3) Add a SSHD account
    - Open control panel
    - Create a new account with administrator rights
    - set a password for this new account

    - Add the user to SSHD password
    `$ cd /etc/`
    `$ cp passwd passwd_bak`
    `$ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd`
    4) Add the user to SSHD password
    $ cd /etc/
    $ cp passwd passwd_bak
    $ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd
    (for example: /bin/mkpasswd.exe -l -u roxlu >> /etc/passwd to add the password for roxlu)

    - Open SSHD port (22)
    5) Open SSHD port (22)
    - Open control panel
    - Click on System and Security
    - Click on Windows Firewall
    @@ -46,17 +51,20 @@ Installing CYGWIN with SSHD
    - click: New Rule ...
    - [x] Port
    NEXT

    - TCP
    Specific ports: 22
    NEXT

    - [x] Allow the connection
    NEXT

    - [x] Domain
    [x] Private
    [x] Public
    NEXT

    - Trouble shooting
    6) Trouble shooting
    - first check if you can connect to the SSHD server on the same machine:
    - open a Cygwin terminal
    $ ssh -l [username] localhost
  2. roxlu revised this gist Feb 26, 2013. 1 changed file with 19 additions and 28 deletions.
    47 changes: 19 additions & 28 deletions install_cygwin_sshd.md
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,22 @@
    Installing CYGWIN with SSHD
    ===========================
    1) Download cygwin setup.exe from http://www.cygwin.com
    - Execute setup.exe
    - Install from internet
    - Root directory: `c:\cygwin` + all users
    - Local package directory: use default value
    - Select a mirror to download files from
    - Select these packages:
    - editors > xemacs 21.4.22-1
    - net > openssh 6.1-p
    - admin > cygrunsrv 1.40-2
    - Download cygwin setup.exe from http://www.cygwin.com
    - Execute setup.exe
    - Install from internet
    - Root directory: `c:\cygwin` + all users
    - Local package directory: use default value
    - Select a mirror to download files from
    - Select these packages:
    - editors > xemacs 21.4.22-1
    - net > openssh 6.1-p
    - admin > cygrunsrv 1.40-2
    - Click continue
    - When everything is installed configure SSHD


    2) Configure SSHD
    - Configure SSHD
    - open a cygwin terminal: start > RIGHT MOUSE ON "Cygwin terminal" AND "RUN AS ADMINISTRATOR"
    - $ ssh-host-config
    - `$ ssh-host-config`
    - Are you sure you want to continue: YES
    - You have the required privileges: YES
    - Overwrite existing /etc/ssh_config: YES
    @@ -25,25 +25,19 @@ Installing CYGWIN with SSHD
    - Do you want to install 'sshd' as a service: YES
    - name CYGWIN: just press enter
    - Do you want to use a different name: no

    +++ you can skip this ++
    - Create new privileged user account (cyg_server): YES
    - enter password
    - reenter password
    +++ end of skip ++

    3) Add a SSHD account
    - Add a SSHD account
    - Open control panel
    - Create a new account with administrator rights
    - set a password for this new account

    4) Add the user to SSHD password
    $ cd /etc/
    $ cp passwd passwd_bak
    $ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd
    - Add the user to SSHD password
    `$ cd /etc/`
    `$ cp passwd passwd_bak`
    `$ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd`
    (for example: /bin/mkpasswd.exe -l -u roxlu >> /etc/passwd to add the password for roxlu)

    5) Open SSHD port (22)
    - Open SSHD port (22)
    - Open control panel
    - Click on System and Security
    - Click on Windows Firewall
    @@ -52,20 +46,17 @@ Installing CYGWIN with SSHD
    - click: New Rule ...
    - [x] Port
    NEXT

    - TCP
    Specific ports: 22
    NEXT

    - [x] Allow the connection
    NEXT

    - [x] Domain
    [x] Private
    [x] Public
    NEXT

    6) Trouble shooting
    - Trouble shooting
    - first check if you can connect to the SSHD server on the same machine:
    - open a Cygwin terminal
    $ ssh -l [username] localhost
  3. roxlu renamed this gist Feb 26, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. roxlu created this gist Feb 26, 2013.
    80 changes: 80 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,80 @@
    Installing CYGWIN with SSHD
    ===========================
    1) Download cygwin setup.exe from http://www.cygwin.com
    - Execute setup.exe
    - Install from internet
    - Root directory: `c:\cygwin` + all users
    - Local package directory: use default value
    - Select a mirror to download files from
    - Select these packages:
    - editors > xemacs 21.4.22-1
    - net > openssh 6.1-p
    - admin > cygrunsrv 1.40-2
    - Click continue
    - When everything is installed configure SSHD


    2) Configure SSHD
    - open a cygwin terminal: start > RIGHT MOUSE ON "Cygwin terminal" AND "RUN AS ADMINISTRATOR"
    - $ ssh-host-config
    - Are you sure you want to continue: YES
    - You have the required privileges: YES
    - Overwrite existing /etc/ssh_config: YES
    - Should privilege separation be used: YES
    - Use local account 'sshd': YES
    - Do you want to install 'sshd' as a service: YES
    - name CYGWIN: just press enter
    - Do you want to use a different name: no

    +++ you can skip this ++
    - Create new privileged user account (cyg_server): YES
    - enter password
    - reenter password
    +++ end of skip ++

    3) Add a SSHD account
    - Open control panel
    - Create a new account with administrator rights
    - set a password for this new account

    4) Add the user to SSHD password
    $ cd /etc/
    $ cp passwd passwd_bak
    $ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd
    (for example: /bin/mkpasswd.exe -l -u roxlu >> /etc/passwd to add the password for roxlu)

    5) Open SSHD port (22)
    - Open control panel
    - Click on System and Security
    - Click on Windows Firewall
    - On the left click on advanced settings
    - click: select "Inbound Rules"
    - click: New Rule ...
    - [x] Port
    NEXT

    - TCP
    Specific ports: 22
    NEXT

    - [x] Allow the connection
    NEXT

    - [x] Domain
    [x] Private
    [x] Public
    NEXT

    6) Trouble shooting
    - first check if you can connect to the SSHD server on the same machine:
    - open a Cygwin terminal
    $ ssh -l [username] localhost

    If you can't connect to the server on localhost check if the sshd daemon is running (see blow)

    - check if the SSHD daemon is runing
    - open control panel
    - search for "services"
    - click on "View local services"
    - search for "CYGWIN sshd"
    - make sure it's there, else try reinstalling sshd