blob: dfe17867927512cdc340baba7716c86a970ffd2f [file] [log] [blame]
Ben Lindstroma5820292001-07-18 16:25:41 +00001This package is the actual port of OpenSSH to Cygwin 1.3.
2
3===========================================================================
4Important change since 2.9p2:
5
6Since Cygwin is able to switch user context without password beginning
7with version 1.3.2, OpenSSH now allows to do so when it's running under
8a version >= 1.3.2. Keep in mind that `ntsec' has to be activated to
9allow that feature.
10===========================================================================
Kevin Steves9be6e262000-10-29 19:18:49 +000011
12===========================================================================
13Important change since 2.3.0p1:
14
15When using `ntea' or `ntsec' you now have to care for the ownership
16and permission bits of your host key files and your private key files.
17The host key files have to be owned by the NT account which starts
18sshd. The user key files have to be owned by the user. The permission
19bits of the private key files (host and user) have to be at least
20rw------- (0600)!
21
22Note that this is forced under `ntsec' only if the files are on a NTFS
23filesystem (which is recommended) due to the lack of any basic security
24features of the FAT/FAT32 filesystems.
25===========================================================================
26
Damien Miller8ac0a7e2001-03-07 21:38:19 +110027If you are installing OpenSSH the first time, you can generate global config
28files and server keys by running
Kevin Steves9be6e262000-10-29 19:18:49 +000029
Ben Lindstromb100ec92001-01-19 05:37:32 +000030 /usr/bin/ssh-host-config
Kevin Steves9be6e262000-10-29 19:18:49 +000031
Ben Lindstromb100ec92001-01-19 05:37:32 +000032Note that this binary archive doesn't contain default config files in /etc.
33That files are only created if ssh-host-config is started.
34
35If you are updating your installation you may run the above ssh-host-config
Kevin Steves9be6e262000-10-29 19:18:49 +000036as well to move your configuration files to the new location and to
37erase the files at the old location.
38
Ben Lindstromb100ec92001-01-19 05:37:32 +000039To support testing and unattended installation ssh-host-config got
40some options:
Kevin Steves9be6e262000-10-29 19:18:49 +000041
Ben Lindstromb100ec92001-01-19 05:37:32 +000042usage: ssh-host-config [OPTION]...
43Options:
44 --debug -d Enable shell's debug output.
45 --yes -y Answer all questions with "yes" automatically.
46 --no -n Answer all questions with "no" automatically.
Damien Miller8ac0a7e2001-03-07 21:38:19 +110047 --port -p <n> sshd listens on port n.
Ben Lindstromb100ec92001-01-19 05:37:32 +000048
Ben Lindstroma5820292001-07-18 16:25:41 +000049Additionally ssh-host-config now asks if it should install sshd as a
50service when running under NT/W2K. This requires cygrunsrv installed.
51
Ben Lindstromb100ec92001-01-19 05:37:32 +000052You can create the private and public keys for a user now by running
53
54 /usr/bin/ssh-user-config
55
56under the users account.
57
58To support testing and unattended installation ssh-user-config got
59some options as well:
60
61usage: ssh-user-config [OPTION]...
62Options:
63 --debug -d Enable shell's debug output.
64 --yes -y Answer all questions with "yes" automatically.
65 --no -n Answer all questions with "no" automatically.
66 --passphrase -p word Use "word" as passphrase automatically.
Kevin Steves9be6e262000-10-29 19:18:49 +000067
Ben Lindstroma5820292001-07-18 16:25:41 +000068Install sshd as daemon via cygrunsrv.exe (recommended on NT/W2K), via inetd
Kevin Steves9be6e262000-10-29 19:18:49 +000069(results in very slow deamon startup!) or from the command line (recommended
70on 9X/ME).
71
Ben Lindstroma5820292001-07-18 16:25:41 +000072If you start sshd as deamon via cygrunsrv.exe you MUST give the
73"-D" option to sshd. Otherwise the service can't get started at all.
Ben Lindstrom834417a2001-05-03 22:45:21 +000074
Kevin Steves9be6e262000-10-29 19:18:49 +000075If starting via inetd, copy sshd to eg. /usr/sbin/in.sshd and add the
76following line to your inetd.conf file:
77
78sshd stream tcp nowait root /usr/sbin/in.sshd sshd -i
79
80Moreover you'll have to add the following line to your
81${SYSTEMROOT}/system32/drivers/etc/services file:
82
83 sshd 22/tcp #SSH daemon
84
Ben Lindstroma5820292001-07-18 16:25:41 +000085===========================================================================
86The following restrictions only apply to Cygwin versions up to 1.3.1
87===========================================================================
88
Kevin Steves9be6e262000-10-29 19:18:49 +000089Authentication to sshd is possible in one of two ways.
90You'll have to decide before starting sshd!
91
92- If you want to authenticate via RSA and you want to login to that
93 machine to exactly one user account you can do so by running sshd
94 under that user account. You must change /etc/sshd_config
95 to contain the following:
96
97 RSAAuthentication yes
98
99 Moreover it's possible to use rhosts and/or rhosts with
100 RSA authentication by setting the following in sshd_config:
101
102 RhostsAuthentication yes
103 RhostsRSAAuthentication yes
104
105- If you want to be able to login to different user accounts you'll
106 have to start sshd under system account or any other account that
107 is able to switch user context. Note that administrators are _not_
108 able to do that by default! You'll have to give the following
109 special user rights to the user:
110 "Act as part of the operating system"
111 "Replace process level token"
112 "Increase quotas"
113 and if used via service manager
114 "Logon as a service".
115
116 The system account does of course own that user rights by default.
117
118 Unfortunately, if you choose that way, you can only logon with
119 NT password authentification and you should change
120 /etc/sshd_config to contain the following:
121
122 PasswordAuthentication yes
123 RhostsAuthentication no
124 RhostsRSAAuthentication no
125 RSAAuthentication no
126
127 However you can login to the user which has started sshd with
128 RSA authentication anyway. If you want that, change the RSA
129 authentication setting back to "yes":
130
131 RSAAuthentication yes
132
Ben Lindstromde2273f2001-03-14 21:30:18 +0000133Please note that OpenSSH does never use the value of $HOME to
134search for the users configuration files! It always uses the
135value of the pw_dir field in /etc/passwd as the home directory.
136If no home diretory is set in /etc/passwd, the root directory
137is used instead!
138
Kevin Steves9be6e262000-10-29 19:18:49 +0000139You may use all features of the CYGWIN=ntsec setting the same
140way as they are used by the `login' port on sources.redhat.com:
141
142 The pw_gecos field may contain an additional field, that begins
143 with (upper case!) "U-", followed by the domain and the username
144 separated by a backslash.
145 CAUTION: The SID _must_ remain the _last_ field in pw_gecos!
146 BTW: The field separator in pw_gecos is the comma.
147 The username in pw_name itself may be any nice name:
148
149 domuser::1104:513:John Doe,U-domain\user,S-1-5-21-...
150
151 Now you may use `domuser' as your login name with telnet!
152 This is possible additionally for local users, if you don't like
153 your NT login name ;-) You only have to leave out the domain:
154
155 locuser::1104:513:John Doe,U-user,S-1-5-21-...
156
Ben Lindstromde2273f2001-03-14 21:30:18 +0000157SSH2 server and user keys are generated by the `ssh-*-config' scripts
158as well.
Kevin Steves9be6e262000-10-29 19:18:49 +0000159
Kevin Steves9be6e262000-10-29 19:18:49 +0000160If you want to build from source, the following options to
161configure are used for the Cygwin binary distribution:
162
Ben Lindstroma5820292001-07-18 16:25:41 +0000163 --prefix=/usr \
164 --sysconfdir=/etc \
165 --libexecdir='${exec_prefix}/sbin \
166 --with-pcre
Kevin Steves9be6e262000-10-29 19:18:49 +0000167
168You must have installed the zlib, openssl and regex packages to
Ben Lindstroma5820292001-07-18 16:25:41 +0000169be able to build OpenSSH! The `--with-pcre' option requires
170the installation of the pcre package.
Kevin Steves9be6e262000-10-29 19:18:49 +0000171
Ben Lindstroma5820292001-07-18 16:25:41 +0000172Please send requests, error reports etc. to cygwin@cygwin.com.
Kevin Steves9be6e262000-10-29 19:18:49 +0000173
174Have fun,
175
Ben Lindstroma5820292001-07-18 16:25:41 +0000176Corinna Vinschen <vinschen@redhat.com>
Kevin Steves9be6e262000-10-29 19:18:49 +0000177Cygwin Developer
178Red Hat Inc.