summaryrefslogtreecommitdiff
path: root/debian/README.Debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian/README.Debian')
-rw-r--r--debian/README.Debian229
1 files changed, 229 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 000000000..4d16eb4d8
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,229 @@
1OpenSSH for Debian
2------------------
3
4UPGRADE ISSUES
5==============
6
7Privilege Separation
8--------------------
9
10As of 3.3, openssh has employed privilege separation to reduce the
11quantity of code that runs as root, thereby reducing the impact of
12some security holes in sshd. This now also works properly with PAM.
13
14Privilege separation is turned on by default, so, if you decide you
15want it turned off, you need to add "UsePrivilegeSeparation no" to
16/etc/ssh/sshd_config.
17
18PermitRootLogin
19---------------
20
21As of 1:6.6p1-1, new installations will be set to "PermitRootLogin
22without-password". This disables password authentication for root, foiling
23password dictionary attacks on the root user. Some sites may wish to use
24the stronger "PermitRootLogin forced-commands-only" or "PermitRootLogin no",
25but note that "PermitRootLogin no" will break setups that SSH to root with a
26forced command to take full-system backups. You can use PermitRootLogin in
27a Match block if you want finer-grained control here.
28
29For many years Debian's OpenSSH packaging used "PermitRootLogin yes", in
30line with upstream. To avoid breaking local setups, this is still true for
31installations upgraded from before 1:6.6p1-1. If you wish to change this,
32you should edit /etc/ssh/sshd_config, change it manually, and run "service
33ssh restart" as root.
34
35Disabling PermitRootLogin means that an attacker possessing credentials for
36the root account (any credentials in the case of "yes", or private key
37material in the case of "without-password") must compromise a normal user
38account rather than being able to SSH directly to root. Be careful to avoid
39a false illusion of security if you change this setting; any account you
40escalate to root from should be considered equivalent to root for the
41purposes of security against external attack. You might for example disable
42it if you know you will only ever log in as root from the physical console.
43
44Since the root account does not generally have non-password credentials
45unless you explicitly install an SSH public key in its
46~/.ssh/authorized_keys, which you presumably only do if you want to SSH to
47it, "without-password" should be a reasonable default for most sites.
48
49For further discussion, see:
50
51 https://bugs.debian.org/298138
52 https://bugzilla.mindrot.org/show_bug.cgi?id=2164
53
54X11 Forwarding
55--------------
56
57ssh's default for ForwardX11 has been changed to ``no'' because it has
58been pointed out that logging into remote systems administered by
59untrusted people is likely to open you up to X11 attacks, so you
60should have to actively decide that you trust the remote machine's
61root, before enabling X11. I strongly recommend that you do this on a
62machine-by-machine basis, rather than just enabling it in the default
63host settings.
64
65In order for X11 forwarding to work, you need to install xauth on the
66server. In Debian this is in the xbase-clients package.
67
68As of OpenSSH 3.1, the remote $DISPLAY uses localhost by default to reduce
69the security risks of X11 forwarding. Look up X11UseLocalhost in
70sshd_config(8) if this is a problem.
71
72OpenSSH 3.8 invented ForwardX11Trusted, which when set to no causes the
73ssh client to create an untrusted X cookie so that attacks on the
74forwarded X11 connection can't become attacks on X clients on the remote
75machine. However, this has some problems in implementation - notably a
76very short timeout of the untrusted cookie - breaks large numbers of
77existing setups, and generally seems immature. The Debian package
78therefore sets the default for this option to "yes" (in ssh itself,
79rather than in ssh_config).
80
81Fallback to RSH
82---------------
83
84The default for this setting has been changed from Yes to No, for
85security reasons, and to stop the delay attempting to rsh to machines
86that don't offer the service. Simply switch it back on in either
87/etc/ssh/ssh_config or ~/.ssh/config for those machines that you need
88it for.
89
90Setgid ssh-agent and environment variables
91------------------------------------------
92
93As of version 1:3.5p1-1, ssh-agent is installed setgid to prevent ptrace()
94attacks retrieving private key material. This has the side-effect of causing
95glibc to remove certain environment variables which might have security
96implications for set-id programs, including LD_PRELOAD, LD_LIBRARY_PATH, and
97TMPDIR.
98
99If you need to set any of these environment variables, you will need to do
100so in the program exec()ed by ssh-agent. This may involve creating a small
101wrapper script.
102
103Symlink Hostname invocation
104---------------------------
105
106This version of ssh no longer includes support for invoking ssh with the
107hostname as the name of the file run. People wanting this support should
108use the ssh-argv0 script.
109
110=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
111
112OTHER ISSUES
113============
114
115/usr/bin/ssh not SUID
116---------------------
117
118Due to Debian bug #164325, RhostsRSAAuthentication can only be used if ssh
119is SUID. Until this is fixed, if that is a problem, use:
120
121 dpkg-statoverride
122
123or if that's also missing, use this:
124
125 chown root.root /usr/bin/ssh
126 chmod 04755 /usr/bin/ssh
127
128Authorization Forwarding
129------------------------
130
131Similarly, root on a remote server could make use of your ssh-agent
132(while you're logged into their machine) to obtain access to machines
133which trust your keys. This feature is therefore disabled by default.
134You should only re-enable it for those hosts (in your ~/.ssh/config or
135/etc/ssh/ssh_config) where you are confident that the remote machine
136is not a threat.
137
138Problems logging in with RSA authentication
139-------------------------------------------
140
141If you have trouble logging in with RSA authentication then the
142problem is probably caused by the fact that you have your home
143directory writable by group, as well as user (this is the default on
144Debian systems).
145
146Depending upon other settings on your system (i.e. other users being
147in your group) this could open a security hole, so you will need to
148make your home directory writable only by yourself. Run this command,
149as yourself:
150
151 chmod g-w ~/
152
153to remove group write permissions. If you use ssh-copy-id to install your
154keys, it does this for you.
155
156-L option of ssh nonfree
157------------------------
158
159non-free ssh supported the usage of the option -L to use a non privileged
160port for scp. This option will not be supported by scp from openssh.
161
162Please use instead scp -o "UsePrivilegedPort=no" as documented in the
163manpage to scp itself.
164
165Problem logging in because of TCP-Wrappers
166------------------------------------------
167
168ssh is compiled with support for tcp-wrappers. So if you can no longer
169log into your system, please check that /etc/hosts.allow and /etc/hosts.deny
170are configured so that ssh is not blocked.
171
172Kerberos support
173----------------
174
175ssh is now compiled with Kerberos support. Unfortunately, privilege
176separation is incompatible with Kerberos support for SSH protocol 1 and
177parts of the support for protocol 2; you may need to run kinit after logging
178in.
179
180Interoperability between scp and the ssh.com SSH server
181-------------------------------------------------------
182
183In version 2 and greater of the commercial SSH server produced by SSH
184Communications Security, scp was changed to use SFTP (SSH2's file transfer
185protocol) instead of the traditional rcp-over-ssh, thereby breaking
186compatibility. The OpenSSH developers regard this as a bug in the ssh.com
187server, and do not currently intend to change OpenSSH's scp to match.
188
189Workarounds for this problem are to install scp1 on the server (scp2 will
190fall back to it), to use sftp, or to use some other transfer mechanism such
191as rsync-over-ssh or tar-over-ssh.
192
193Running sshd from inittab
194-------------------------
195
196Some people find it useful to run the sshd server from inittab, to make sure
197that it always stays running. To do this, stop sshd ('/etc/init.d/ssh
198stop'), add the following line to /etc/inittab, and run 'telinit q':
199
200 ss:2345:respawn:/usr/sbin/sshd -D
201
202If you do this, note that you will need to stop sshd being started in the
203normal way ('update-rc.d ssh disable') and that you will need to restart
204this sshd manually on upgrades.
205
206Per-connection sshd instances with systemd
207------------------------------------------
208
209If you want to reconfigure systemd to listen on port 22 itself and launch an
210instance of sshd for each connection (inetd-style socket activation), then
211you can run:
212
213 systemctl stop ssh.service
214 systemctl start ssh.socket
215
216To make this permanent:
217
218 systemctl disable ssh.service
219 systemctl enable ssh.socket
220
221This may be appropriate in environments where minimal footprint is critical
222(e.g. cloud guests). Be aware that this bypasses MaxStartups, and systemd's
223MaxConnections cannot quite replace this as it cannot distinguish between
224authenticated and unauthenticated connections; see
225https://bugzilla.redhat.com/show_bug.cgi?id=963268 for more discussion.
226
227--
228Matthew Vernon <matthew@debian.org>
229Colin Watson <cjwatson@debian.org>