|
1 |
| -1. Downloading Cygwin |
2 |
| - - download cygwin setup.exe and run it |
3 |
| - - choose an appropriate mirror |
4 |
| - Note: I will assume that Cygwin will be installed into C:\Programs\Cygwin. Do not install Cygwin into a folder that contains a space character (C:\Program Files). If you do so, you will face many random and unexpected troubles. |
5 |
| -2. Install from packages, choose the following: |
6 |
| - - OpenSSH, |
7 |
| - - tcp_wrappers, |
8 |
| - - diffutils [this should be pre-selected], |
9 |
| - - zlib |
10 |
| - |
11 |
| - proceed with installation until it is finished. |
| 1 | +### 1. Downloading Cygwin |
| 2 | + - download cygwin setup.exe and run it |
| 3 | + - choose an appropriate mirror |
| 4 | +`Note: I will assume that Cygwin will be installed into C:\Programs\Cygwin. Do not install Cygwin into a folder that contains a space character (C:\Program Files). If you do so, you will face many random and unexpected troubles.` |
12 | 5 |
|
13 |
| -3. Configuring Cygwin |
| 6 | +### 2. Install from packages, choose the following: |
| 7 | + - OpenSSH, |
| 8 | + - tcp_wrappers, |
| 9 | + - diffutils [this should be pre-selected], |
| 10 | + - zlib |
| 11 | + proceed with installation until it is finished. |
14 | 12 |
|
15 |
| - - run CygWin Bash Shell with Administrator privileges (C:\cygwin\Cygwin.bat) |
16 |
| - - from this Bash shell run ssh-host-config |
17 |
| - - say “yes” to privilege separation |
18 |
| - - say “yes” to create the sshd account |
19 |
| - - say “yes” to install sshd as a service |
20 |
| - - press to enter an empty value of CYGWIN for the daemon |
21 |
| - - Now Cygwin needs to create a new account that will be used as a “proxy”/setuid origin account. Say “no” to use the default name (cyg_server). |
22 |
| - - say “yes” to create a new privileged account cyg_server. |
23 |
| - - create a password for this new privileged account and confirm it |
24 |
| - - synchronize Windows user accounts with Cygwin user accounts: |
| 13 | +### 3. Configuring Cygwin |
| 14 | + - run CygWin Bash Shell with Administrator privileges (C:\cygwin\Cygwin.bat) |
| 15 | + - from this Bash shell run ssh-host-config |
| 16 | + - say “yes” to privilege separation |
| 17 | + - say “yes” to create the sshd account |
| 18 | + - say “yes” to install sshd as a service |
| 19 | + - press to enter an empty value of CYGWIN for the daemon |
| 20 | + Now Cygwin needs to create a new account that will be used as a “proxy”/setuid origin account. Say “no” to use the default name (cyg_server). |
| 21 | + - say “yes” to create a new privileged account cyg_server. |
| 22 | + - create a password for this new privileged account and confirm it |
| 23 | + - synchronize Windows user accounts with Cygwin user accounts: |
25 | 24 | mkpasswd -cl > /etc/passwd
|
26 | 25 | mkgroup --local > /etc/group
|
27 |
| - - start SSH server with net start sshd |
| 26 | + - start SSH server with net start sshd |
28 | 27 |
|
29 |
| - - test connection with 'ssh localhost' from Cygwin Bash Shell. |
| 28 | + - test connection with 'ssh localhost' from Cygwin Bash Shell. |
30 | 29 | say “yes” to check and store server fingerprint
|
31 | 30 | put your Windows account password to authenticate
|
32 | 31 | issue a few test commands in the remote session
|
33 | 32 | close session with exit.
|
34 | 33 | alternatively: test your SSHD with putty.
|
35 | 34 |
|
36 |
| -4. Common issues |
37 |
| - - Connection closed by ::1 error |
38 |
| - => How to fix? |
| 35 | +### 4. Common issues |
| 36 | + - Connection closed by ::1 error |
| 37 | + => How to fix? |
39 | 38 | + Check your hosts file: C:\Windows\System32\drivers\etc\hosts
|
40 | 39 | + Uncomment two lines:
|
41 | 40 | 127.0.0.1 localhost
|
|
50 | 49 | net user sshd /delete
|
51 | 50 | net user cyg_server /delete
|
52 | 51 | + Re-install sshd (as step 3.)
|
53 |
| - |
| 52 | + |
0 commit comments