~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to sshd_config.5

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-09-30 23:09:58 UTC
  • mfrom: (1.13.3 upstream) (29 hardy)
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: james.westby@ubuntu.com-20080930230958-o6vsgn8c4mm959s0
Tags: 1:5.1p1-3
* Remove unnecessary ssh-vulnkey output in non-verbose mode when no
  compromised or unknown keys were found (closes: #496495).
* Configure with --disable-strip; dh_strip will deal with stripping
  binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
  closes: #498681).
* Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
  #497026).

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35
35
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
36
.\"
37
 
.\" $OpenBSD: sshd_config.5,v 1.74 2007/03/01 16:19:33 jmc Exp $
38
 
.Dd September 25, 1999
 
37
.\" $OpenBSD: sshd_config.5,v 1.96 2008/07/02 02:24:18 djm Exp $
 
38
.Dd $Mdocdate: July 2 2008 $
39
39
.Dt SSHD_CONFIG 5
40
40
.Os
41
41
.Sh NAME
58
58
.Pq \&"
59
59
in order to represent arguments containing spaces.
60
60
.Pp
 
61
Note that the Debian
 
62
.Ic openssh-server
 
63
package sets several options as standard in
 
64
.Pa /etc/ssh/sshd_config
 
65
which are not the default in
 
66
.Xr sshd 8 .
 
67
The exact list depends on whether the package was installed fresh or
 
68
upgraded from various possible previous versions, but includes at least the
 
69
following:
 
70
.Pp
 
71
.Bl -bullet -offset indent -compact
 
72
.It
 
73
.Cm Protocol No 2
 
74
.It
 
75
.Cm ChallengeResponseAuthentication No no
 
76
.It
 
77
.Cm X11Forwarding No yes
 
78
.It
 
79
.Cm PrintMotd No no
 
80
.It
 
81
.Cm AcceptEnv No LANG LC_*
 
82
.It
 
83
.Cm Subsystem No sftp /usr/lib/openssh/sftp-server
 
84
.It
 
85
.Cm UsePAM No yes
 
86
.El
 
87
.Pp
61
88
The possible
62
89
keywords and their meanings are as follows (note that
63
90
keywords are case-insensitive and arguments are case-sensitive):
95
122
(use IPv6 only).
96
123
The default is
97
124
.Dq any .
 
125
.It Cm AllowAgentForwarding
 
126
Specifies whether
 
127
.Xr ssh-agent 1
 
128
forwarding is permitted.
 
129
The default is
 
130
.Dq yes .
 
131
Note that disabling agent forwarding does not improve security
 
132
unless users are also denied shell access, as they can always install
 
133
their own forwarders.
98
134
.It Cm AllowGroups
99
135
This keyword can be followed by a list of group name patterns, separated
100
136
by spaces.
159
195
The default is
160
196
.Dq .ssh/authorized_keys .
161
197
.It Cm Banner
162
 
In some jurisdictions, sending a warning message before authentication
163
 
may be relevant for getting legal protection.
164
198
The contents of the specified file are sent to the remote user before
165
199
authentication is allowed.
 
200
If the argument is
 
201
.Dq none
 
202
then no banner is displayed.
166
203
This option is only available for protocol version 2.
167
204
By default, no banner is displayed.
168
205
.It Cm ChallengeResponseAuthentication
172
209
are supported.
173
210
The default is
174
211
.Dq yes .
 
212
.It Cm ChrootDirectory
 
213
Specifies a path to
 
214
.Xr chroot 2
 
215
to after authentication.
 
216
This path, and all its components, must be root-owned directories that are
 
217
not writable by any other user or group.
 
218
.Pp
 
219
The path may contain the following tokens that are expanded at runtime once
 
220
the connecting user has been authenticated: %% is replaced by a literal '%',
 
221
%h is replaced by the home directory of the user being authenticated, and
 
222
%u is replaced by the username of that user.
 
223
.Pp
 
224
The
 
225
.Cm ChrootDirectory
 
226
must contain the necessary files and directories to support the
 
227
users' session.
 
228
For an interactive session this requires at least a shell, typically
 
229
.Xr sh 1 ,
 
230
and basic
 
231
.Pa /dev
 
232
nodes such as
 
233
.Xr null 4 ,
 
234
.Xr zero 4 ,
 
235
.Xr stdin 4 ,
 
236
.Xr stdout 4 ,
 
237
.Xr stderr 4 ,
 
238
.Xr arandom 4
 
239
and
 
240
.Xr tty 4
 
241
devices.
 
242
For file transfer sessions using
 
243
.Dq sftp ,
 
244
no additional configuration of the environment is necessary if the
 
245
in-process sftp server is used (see
 
246
.Cm Subsystem
 
247
for details).
 
248
.Pp
 
249
The default is not to
 
250
.Xr chroot 2 .
175
251
.It Cm Ciphers
176
252
Specifies the ciphers allowed for protocol version 2.
177
253
Multiple ciphers must be comma-separated.
284
360
.It Cm ForceCommand
285
361
Forces the execution of the command specified by
286
362
.Cm ForceCommand ,
287
 
ignoring any command supplied by the client.
 
363
ignoring any command supplied by the client and
 
364
.Pa ~/.ssh/rc
 
365
if present.
288
366
The command is invoked by using the user's login shell with the -c option.
289
367
This applies to shell, command, or subsystem execution.
290
368
It is most useful inside a
293
371
The command originally supplied by the client is available in the
294
372
.Ev SSH_ORIGINAL_COMMAND
295
373
environment variable.
 
374
Specifying a command of
 
375
.Dq internal-sftp
 
376
will force the use of an in-process sftp server that requires no support
 
377
files when used with
 
378
.Cm ChrootDirectory .
296
379
.It Cm GatewayPorts
297
380
Specifies whether remote hosts are allowed to connect to ports
298
381
forwarded for the client.
512
595
for data integrity protection.
513
596
Multiple algorithms must be comma-separated.
514
597
The default is:
515
 
.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
 
598
.Bd -literal -offset indent
 
599
hmac-md5,hmac-sha1,umac-64@openssh.com,
 
600
hmac-ripemd160,hmac-sha1-96,hmac-md5-96
 
601
.Ed
516
602
.It Cm Match
517
603
Introduces a conditional block.
518
604
If all of the criteria on the
521
607
set in the global section of the config file, until either another
522
608
.Cm Match
523
609
line or the end of the file.
 
610
.Pp
524
611
The arguments to
525
612
.Cm Match
526
613
are one or more criteria-pattern pairs.
530
617
.Cm Host ,
531
618
and
532
619
.Cm Address .
 
620
The match patterns may consist of single entries or comma-separated
 
621
lists and may use the wildcard and negation operators described in the
 
622
.Sx PATTERNS
 
623
section of
 
624
.Xr ssh_config 5 .
 
625
.Pp
 
626
The patterns in an
 
627
.Cm Address
 
628
criteria may additionally contain addresses to match in CIDR
 
629
address/masklen format, e.g.\&
 
630
.Dq 192.0.2.0/24
 
631
or
 
632
.Dq 3ffe:ffff::/32 .
 
633
Note that the mask length provided must be consistent with the address -
 
634
it is an error to specify a mask length that is too long for the address
 
635
or one with bits set in this host portion of the address.
 
636
For example,
 
637
.Dq 192.0.2.0/33
 
638
and
 
639
.Dq 192.0.2.0/8
 
640
respectively.
 
641
.Pp
533
642
Only a subset of keywords may be used on the lines following a
534
643
.Cm Match
535
644
keyword.
536
645
Available keywords are
537
646
.Cm AllowTcpForwarding ,
538
647
.Cm Banner ,
 
648
.Cm ChrootDirectory ,
539
649
.Cm ForceCommand ,
540
650
.Cm GatewayPorts ,
541
 
.Cm GSSApiAuthentication ,
 
651
.Cm GSSAPIAuthentication ,
 
652
.Cm HostbasedAuthentication ,
542
653
.Cm KbdInteractiveAuthentication ,
543
654
.Cm KerberosAuthentication ,
 
655
.Cm MaxAuthTries ,
 
656
.Cm MaxSessions ,
544
657
.Cm PasswordAuthentication ,
545
658
.Cm PermitOpen ,
 
659
.Cm PermitRootLogin ,
546
660
.Cm RhostsRSAAuthentication ,
547
661
.Cm RSAAuthentication ,
548
662
.Cm X11DisplayOffset ,
555
669
Once the number of failures reaches half this value,
556
670
additional failures are logged.
557
671
The default is 6.
 
672
.It Cm MaxSessions
 
673
Specifies the maximum number of open sessions permitted per network connection.
 
674
The default is 10.
558
675
.It Cm MaxStartups
559
676
Specifies the maximum number of concurrent unauthenticated connections to the
560
677
SSH daemon.
583
700
Specifies whether password authentication is allowed.
584
701
The default is
585
702
.Dq yes .
 
703
.It Cm PermitBlacklistedKeys
 
704
Specifies whether
 
705
.Xr sshd 8
 
706
should allow keys recorded in its blacklist of known-compromised keys (see
 
707
.Xr ssh-vulnkey 1 ) .
 
708
If
 
709
.Dq yes ,
 
710
then attempts to authenticate with compromised keys will be logged but
 
711
accepted.
 
712
If
 
713
.Dq no ,
 
714
then attempts to authenticate with compromised keys will be rejected.
 
715
The default is
 
716
.Dq no .
586
717
.It Cm PermitEmptyPasswords
587
718
When password authentication is allowed, it specifies whether the
588
719
server allows login to accounts with empty password strings.
744
875
This option applies to protocol version 1 only.
745
876
.It Cm ServerKeyBits
746
877
Defines the number of bits in the ephemeral protocol version 1 server key.
747
 
The minimum value is 512, and the default is 768.
 
878
The minimum value is 512, and the default is 1024.
748
879
.It Cm StrictModes
749
880
Specifies whether
750
881
.Xr sshd 8
758
889
Configures an external subsystem (e.g. file transfer daemon).
759
890
Arguments should be a subsystem name and a command (with optional arguments)
760
891
to execute upon subsystem request.
 
892
.Pp
761
893
The command
762
894
.Xr sftp-server 8
763
895
implements the
764
896
.Dq sftp
765
897
file transfer subsystem.
 
898
.Pp
 
899
Alternately the name
 
900
.Dq internal-sftp
 
901
implements an in-process
 
902
.Dq sftp
 
903
server.
 
904
This may simplify configurations using
 
905
.Cm ChrootDirectory
 
906
to force a different filesystem root on clients.
 
907
.Pp
766
908
By default no subsystems are defined.
767
909
Note that this option applies to protocol version 2 only.
768
910
.It Cm SyslogFacility