]> andersk Git - gssapi-openssh.git/blame - openssh/contrib/cygwin/README
Import of openssh-SNAP-20040105
[gssapi-openssh.git] / openssh / contrib / cygwin / README
CommitLineData
12408a1b 1This package describes important Cygwin specific stuff concerning OpenSSH.
2
3The binary package is usually built for recent Cygwin versions and might
4not run on older versions. Please check http://cygwin.com/ for information
5about current Cygwin releases.
6
7Build instructions are at the end of the file.
8
9===========================================================================
10Important change since 3.7.1p2-2:
11
12The ssh-host-config file doesn't create the /etc/ssh_config and
13/etc/sshd_config files from builtin here-scripts anymore, but it uses
14skeleton files installed in /etc/defaults/etc.
15
16Also it now tries hard to create appropriate permissions on files.
17Same applies for ssh-user-config.
18
19After creating the sshd service with ssh-host-config, it's advisable to
20call ssh-user-config for all affected users, also already exising user
21configurations. In the latter case, file and directory permissions are
22checked and changed, if requireed to match the host configuration.
23
24Important note for Windows 2003 Server users:
25---------------------------------------------
26
272003 Server has a funny new feature. When starting services under SYSTEM
28account, these services have nearly all user rights which SYSTEM holds...
29except for the "Create a token object" right, which is needed to allow
30public key authentication :-(
31
32There's no way around this, except for creating a substitute account which
33has the appropriate privileges. Basically, this account should be member
34of the administrators group, plus it should have the following user rights:
35
36 Create a token object
37 Logon as a service
38 Replace a process level token
39 Increase Quota
40
41The ssh-host-config script asks you, if it should create such an account,
42called "sshd_server". If you say "no" here, you're on your own. Please
43follow the instruction in ssh-host-config exactly if possible. Note that
44ssh-user-config sets the permissions on 2003 Server machines dependent of
45whether a sshd_server account exists or not.
46===========================================================================
3c0ef626 47
41b2f314 48===========================================================================
49Important change since 3.4p1-2:
50
51This version adds privilege separation as default setting, see
52/usr/doc/openssh/README.privsep. According to that document the
53privsep feature requires a non-privileged account called 'sshd'.
54
55The new ssh-host-config file which is part of this version asks
56to create 'sshd' as local user if you want to use privilege
57separation. If you confirm, it creates that NT user and adds
58the necessary entry to /etc/passwd.
59
60On 9x/Me systems the script just sets UsePrivilegeSeparation to "no"
61since that feature doesn't make any sense on a system which doesn't
62differ between privileged and unprivileged users.
63
64The new ssh-host-config script also adds the /var/empty directory
65needed by privilege separation. When creating the /var/empty directory
66by yourself, please note that in contrast to the README.privsep document
67the owner sshould not be "root" but the user which is running sshd. So,
68in the standard configuration this is SYSTEM. The ssh-host-config script
69chowns /var/empty accordingly.
70===========================================================================
71
e9a17296 72===========================================================================
73Important change since 3.0.1p1-2:
74
75This version introduces the ability to register sshd as service on
76Windows 9x/Me systems. This is done only when the options -D and/or
77-d are not given.
78===========================================================================
79
3c0ef626 80===========================================================================
81Important change since 2.9p2:
82
83Since Cygwin is able to switch user context without password beginning
84with version 1.3.2, OpenSSH now allows to do so when it's running under
85a version >= 1.3.2. Keep in mind that `ntsec' has to be activated to
86allow that feature.
87===========================================================================
88
89===========================================================================
90Important change since 2.3.0p1:
91
92When using `ntea' or `ntsec' you now have to care for the ownership
93and permission bits of your host key files and your private key files.
94The host key files have to be owned by the NT account which starts
95sshd. The user key files have to be owned by the user. The permission
96bits of the private key files (host and user) have to be at least
97rw------- (0600)!
98
99Note that this is forced under `ntsec' only if the files are on a NTFS
100filesystem (which is recommended) due to the lack of any basic security
101features of the FAT/FAT32 filesystems.
102===========================================================================
103
104If you are installing OpenSSH the first time, you can generate global config
105files and server keys by running
12408a1b 106
3c0ef626 107 /usr/bin/ssh-host-config
108
109Note that this binary archive doesn't contain default config files in /etc.
110That files are only created if ssh-host-config is started.
111
112If you are updating your installation you may run the above ssh-host-config
113as well to move your configuration files to the new location and to
114erase the files at the old location.
115
116To support testing and unattended installation ssh-host-config got
117some options:
118
119usage: ssh-host-config [OPTION]...
120Options:
121 --debug -d Enable shell's debug output.
122 --yes -y Answer all questions with "yes" automatically.
123 --no -n Answer all questions with "no" automatically.
124 --port -p <n> sshd listens on port n.
125
126Additionally ssh-host-config now asks if it should install sshd as a
127service when running under NT/W2K. This requires cygrunsrv installed.
128
129You can create the private and public keys for a user now by running
130
131 /usr/bin/ssh-user-config
132
133under the users account.
134
135To support testing and unattended installation ssh-user-config got
136some options as well:
137
138usage: ssh-user-config [OPTION]...
139Options:
140 --debug -d Enable shell's debug output.
141 --yes -y Answer all questions with "yes" automatically.
142 --no -n Answer all questions with "no" automatically.
143 --passphrase -p word Use "word" as passphrase automatically.
144
145Install sshd as daemon via cygrunsrv.exe (recommended on NT/W2K), via inetd
146(results in very slow deamon startup!) or from the command line (recommended
147on 9X/ME).
148
149If you start sshd as deamon via cygrunsrv.exe you MUST give the
150"-D" option to sshd. Otherwise the service can't get started at all.
151
152If starting via inetd, copy sshd to eg. /usr/sbin/in.sshd and add the
153following line to your inetd.conf file:
154
e9a17296 155ssh stream tcp nowait root /usr/sbin/in.sshd sshd -i
3c0ef626 156
157Moreover you'll have to add the following line to your
158${SYSTEMROOT}/system32/drivers/etc/services file:
159
e9a17296 160 ssh 22/tcp #SSH daemon
3c0ef626 161
3c0ef626 162Please note that OpenSSH does never use the value of $HOME to
163search for the users configuration files! It always uses the
164value of the pw_dir field in /etc/passwd as the home directory.
165If no home diretory is set in /etc/passwd, the root directory
166is used instead!
167
168You may use all features of the CYGWIN=ntsec setting the same
12408a1b 169way as they are used by Cygwin's login(1) port:
3c0ef626 170
171 The pw_gecos field may contain an additional field, that begins
172 with (upper case!) "U-", followed by the domain and the username
173 separated by a backslash.
174 CAUTION: The SID _must_ remain the _last_ field in pw_gecos!
175 BTW: The field separator in pw_gecos is the comma.
176 The username in pw_name itself may be any nice name:
177
178 domuser::1104:513:John Doe,U-domain\user,S-1-5-21-...
179
180 Now you may use `domuser' as your login name with telnet!
181 This is possible additionally for local users, if you don't like
182 your NT login name ;-) You only have to leave out the domain:
183
184 locuser::1104:513:John Doe,U-user,S-1-5-21-...
185
12408a1b 186Note that the CYGWIN=ntsec setting is required for public key authentication.
187
3c0ef626 188SSH2 server and user keys are generated by the `ssh-*-config' scripts
189as well.
190
191If you want to build from source, the following options to
192configure are used for the Cygwin binary distribution:
193
194 --prefix=/usr \
195 --sysconfdir=/etc \
12408a1b 196 --libexecdir='$(sbindir)' \
197 --localstatedir=/var \
198 --datadir='$(prefix)/share' \
199 --mandir='$(datadir)/man' \
200 --with-tcp-wrappers
201
202If you want to create a Cygwin package, equivalent to the one
203in the Cygwin binary distribution, install like this:
204
205 mkdir /tmp/cygwin-ssh
206 cd $(builddir)
207 make install DESTDIR=/tmp/cygwin-ssh
208 cd $(srcdir)/contrib/cygwin
209 make cygwin-postinstall DESTDIR=/tmp/cygwin-ssh
210 cd /tmp/cygwin-ssh
211 find * \! -type d | tar cvjfT my-openssh.tar.bz2 -
212
213You must have installed the zlib and openssl-devel packages to be able to
700318f3 214build OpenSSH!
3c0ef626 215
216Please send requests, error reports etc. to cygwin@cygwin.com.
217
218Have fun,
219
12408a1b 220Corinna Vinschen
3c0ef626 221Cygwin Developer
222Red Hat Inc.
This page took 0.084721 seconds and 5 git commands to generate.