summaryrefslogtreecommitdiff
path: root/usr/src/man/man1m/sshd.1m
blob: 8383f2d9bccd9fda517c97321264e45fffc19355 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
'\" te
.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
.\" installed location.
.\" Portions Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.TH SSHD 1M "Mar 17, 2009"
.SH NAME
sshd \- secure shell daemon
.SH SYNOPSIS
.LP
.nf
\fBsshd\fR [\fB-deiqtD46\fR] [\fB-b\fR \fIbits\fR] [\fB-f\fR \fIconfig_file\fR]
     [\fB-g\fR \fIlogin_grace_time\fR] [\fB-h\fR \fIhost_key_file\fR]
     [\fB-k\fR \fIkey_gen_time\fR] [\fB-p\fR \fIport\fR] [\fB-V\fR \fIclient_protocol_id\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBsshd\fR (Secure Shell daemon) is the daemon program for \fBssh\fR(1).
Together these programs replace \fBrlogin\fR and \fBrsh\fR, and provide secure
encrypted communications between two untrusted hosts over an insecure network.
The programs are intended to be as easy to install and use as possible.
.sp
.LP
\fBsshd\fR is the daemon that listens for connections from clients. It forks a
new daemon for each incoming connection. The forked daemons handle key
exchange, encryption, authentication, command execution, and data exchange.
.sp
.LP
This implementation of \fBsshd\fR supports both SSH protocol versions 1 and 2
simultaneously. Because of security weaknesses in the v1 protocol, sites should
run only v2, if possible. In the default configuration, only protocol v2 is
enabled for the server. To enable v1 and v2 simultaneously, see the
instructions in \fBsshd_config\fR(4).
.sp
.LP
Support for v1 is provided to help sites with existing \fBssh\fR v1 clients and
servers to transition to v2. v1 might not be supported in a future release.
.SS "SSH Protocol Version 1"
.sp
.LP
Each host has a host-specific RSA key (normally 1024 bits) used to identify the
host. Additionally, when the daemon starts, it generates a server RSA key
(normally 768 bits). This key is normally regenerated every hour if it has been
used, and is never stored on disk.
.sp
.LP
Whenever a client connects the daemon responds with its public host and server
keys. The client compares the RSA host key against its own database to verify
that it has not changed. The client then generates a 256-bit random number. It
encrypts this random number using both the host key and the server key, and
sends the encrypted number to the server. Both sides then use this random
number as a session key which is used to encrypt all further communications in
the session. The rest of the session is encrypted using a conventional cipher,
currently Blowfish or 3DES, with 3DES being used by default. The client selects
the encryption algorithm to use from those offered by the server.
.sp
.LP
Next, the server and the client enter an authentication dialog. The client
tries to authenticate itself using \fB\&.rhosts\fR authentication,
\fB\&.rhosts\fR authentication combined with RSA host authentication, RSA
challenge-response authentication, or password-based authentication.
.sp
.LP
Rhosts authentication is normally disabled because it is fundamentally
insecure, but can be enabled in the server configuration file if desired.
System security is not improved unless \fBrshd\fR(1M), \fBrlogind\fR(1M),
\fBrexecd\fR(1M), and \fBrexd\fR(1M) are disabled (thus completely disabling
\fBrlogin\fR(1) and \fBrsh\fR(1) into the machine).
.SS "SSH Protocol Version 2"
.sp
.LP
Version 2 works similarly to version 1: Each host has a host-specific DSA/RSA
key. However, when the daemon starts, it does not generate a server key.
Forward security is provided through a Diffie-Hellman key agreement. This key
agreement results in a shared session key. The rest of the session is encrypted
using a symmetric cipher, currently 128-bit AES, Blowfish, 3DES, or AES. The
client selects the encryption algorithm to use from those offered by the
server. Additionally, session integrity is provided through a cryptographic
message authentication code (\fBhmac-sha1\fR or \fBhmac-md5\fR).
.sp
.LP
Protocol version 2 provides a public key based user authentication method
(PubKeyAuthentication) GSS-API based user authentication, conventional password
authentication, and a generic prompt/reply protocol for password-based
authentication.
.SS "Command Execution and Data Forwarding"
.sp
.LP
If the client successfully authenticates itself, a dialog for preparing the
session is entered. At this time the client can request things like allocating
a pseudo-tty, forwarding X11 connections, forwarding TCP/IP connections, or
forwarding the authentication agent connection over the secure channel.
.sp
.LP
Finally, the client either requests a shell or execution of a command. The
sides then enter session mode. In this mode, either side may send data at any
time, and such data is forwarded to/from the shell or command on the server
side, and the user terminal on the client side.
.sp
.LP
When the user program terminates and all forwarded X11 and other connections
have been closed, the server sends command exit status to the client, and both
sides exit.
.sp
.LP
\fBsshd\fR can be configured using command-line options or the configuration
file \fB/etc/ssh/ssh_config\fR, described in \fBssh_config\fR(4). Command-line
options override values specified in the configuration file.
.sp
.LP
\fBsshd\fR rereads its configuration file when it receives a hangup signal,
\fBSIGHUP\fR, by executing itself with the name it was started as, that is,
\fB/usr/lib/ssh/sshd\fR.
.SS "Host Access Control"
.sp
.LP
The \fBsshd\fR daemon uses TCP Wrappers to restrict access to hosts. It uses
the service name of \fBsshd\fR for \fBhosts_access()\fR. For more information
on TCP Wrappers see \fBtcpd(1M)\fR and \fBhosts_access(3)\fR man pages, which
are part of the \fBSUNWsfman\fR package (they are not SunOS man pages). TCP
wrappers binaries, including \fBlibwrap\fR, are in \fBSUNWtcpd\fR, a required
package for \fBSUNWsshdu\fR, the package containing \fBsshd\fR.
.SH OPTIONS
.sp
.LP
The options for \fBsshd\fR are as follows:
.sp
.ne 2
.na
\fB\fB-b\fR \fIbits\fR\fR
.ad
.sp .6
.RS 4n
Specifies the number of bits in the server key (the default is 768).
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Debug mode. The server sends verbose debug output to the system log, and does
not put itself in the background. The server also will not fork and will only
process one connection. This option is only intended for debugging for the
server. Multiple \fB-d\fR options increase the debugging level. Maximum is 3.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.sp .6
.RS 4n
When this option is specified, \fBsshd\fR will send the output to standard
error instead of to the system log.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR \fIconfiguration_file\fR\fR
.ad
.sp .6
.RS 4n
Specifies the name of the configuration file. The default is
\fB/etc/ssh/sshd_config\fR. \fBsshd\fR refuses to start if there is no
configuration file.
.RE

.sp
.ne 2
.na
\fB\fB-g\fR \fIlogin_grace_time\fR\fR
.ad
.sp .6
.RS 4n
Gives the grace time for clients to authenticate themselves (the default is 300
seconds). If the client fails to authenticate the user within this number of
seconds, the server disconnects and exits. A value of zero indicates no limit.
.RE

.sp
.ne 2
.na
\fB\fB-h\fR \fIhost_key_file\fR\fR
.ad
.sp .6
.RS 4n
Specifies a file from which a host key is read. This option must be given if
\fBsshd\fR is not run as root (as the normal host key files are normally not
readable by anyone but root). The default is \fB/etc/ssh/ssh_host_key\fR for
protocol version 1, and \fB/etc/ssh/ssh_host_rsa_key\fR and
\fB/etc/ssh/ssh_host_dsa_key\fR for protocol version 2. It is possible to have
multiple host key files for the different protocol versions and host key
algorithms.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.sp .6
.RS 4n
Specifies that \fBsshd\fR is being run from \fBinetd\fR. \fBsshd\fR is normally
not run from \fBinetd\fR because it needs to generate the server key before it
can respond to the client, and this may take tens of seconds. Clients would
have to wait too long if the key was regenerated every time. However, with
small key sizes (for example, 512) using \fBsshd\fR from \fBinetd\fR may be
reasonable.
.RE

.sp
.ne 2
.na
\fB\fB-k\fR \fIkey_gen_time\fR\fR
.ad
.sp .6
.RS 4n
(SSHv1-specific) Specifies how often the server key is regenerated (the default
is 3600 seconds, or one hour). The motivation for regenerating the key fairly
often is that the key is not stored anywhere, and after about an hour, it
becomes impossible to recover the key for decrypting intercepted communications
even if the machine is cracked into or physically seized. A value of zero
indicates that the key will never be regenerated.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR \fIoption\fR\fR
.ad
.sp .6
.RS 4n
Can be used to specify options in the format used in the configuration file.
This is useful for specifying options for which there are no separate
command-line flags.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR \fIport\fR\fR
.ad
.sp .6
.RS 4n
Specifies the port on which the server listens for connections (the default is
22).
.RE

.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.sp .6
.RS 4n
Quiet mode. Nothing is sent to the system log. Normally the beginning,
authentication, and termination of each connection is logged.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.sp .6
.RS 4n
Test mode. Check only the validity of the configuration file and the sanity of
the keys. This is useful for updating sshd reliably as configuration options
might change.
.RE

.sp
.ne 2
.na
\fB\fB-D\fR\fR
.ad
.sp .6
.RS 4n
When this option is specified \fBsshd\fR does not detach and does not become a
daemon. This allows easy monitoring of \fBsshd\fR.
.RE

.sp
.ne 2
.na
\fB\fB-4\fR\fR
.ad
.sp .6
.RS 4n
Forces \fBsshd\fR to use IPv4 addresses only.
.RE

.sp
.ne 2
.na
\fB\fB-6\fR\fR
.ad
.sp .6
.RS 4n
Forces \fBsshd\fR to use IPv6 addresses only.
.RE

.SH EXTENDED DESCRIPTION
.SS "\fBauthorized_keys\fR File Format"
.sp
.LP
The \fB$HOME/.ssh/authorized_keys\fR file lists the public keys that are
permitted for RSA authentication in protocol version 1 and for public key
authentication (\fBPubkeyAuthentication\fR) in protocol version 2. The
\fBAuthorizedKeysFile\fR configuration option can be used to specify an
alternative file.
.sp
.LP
Each line of the file contains one key (empty lines and lines starting with a
hash mark [\fB#\fR] are ignored as comments).
.sp
.LP
For each RSA key for protocol version 1, the file consists of the following
space-separated fields:
.sp
.in +2
.nf
\fIoptions\fR  \fIbits\fR  \fIexponent\fR  \fImodulus\fR  \fIcomment\fR
.fi
.in -2
.sp

.sp
.LP
For the public key for protocol version 2, the file consists of the following
space-separated fields:
.sp
.in +2
.nf
\fIoptions\fR \fIkey-type\fR \fIbase64-encoding-key\fR \fIcomment\fR
.fi
.in -2
.sp

.sp
.LP
For protocol version 2, \fIkey-type\fR is one of \fBssh-rsa\fR or
\fBssh-dsa\fR.
.sp
.LP
The options field is optional; its presence is determined by whether the line
starts with a number. (The option field never starts with a number.) The bits,
exponent, and modulus fields give the RSA key; the comment field is a
convenient place for you to identify the key.
.sp
.LP
Lines in this file are usually several hundred bytes long (because of the size
of the key modulus). You will find it very inconvenient to type them in;
instead, copy the public key file and edit it.
.sp
.LP
Permissions of this file must be set so that it is not world or group writable.
See the \fBStrictModes\fR option of \fBsshd_config\fR(4).
.sp
.LP
The options (if present) consist of comma-separated option specifications. No
spaces are permitted, except within double quotes. The following option
specifications are supported:
.sp
.ne 2
.na
\fB\fBfrom="\fIpattern-list\fR"\fR\fR
.ad
.sp .6
.RS 4n
Specifies that, in addition to public key authentication, the canonical name of
the remote host must be present in the comma-separated list of patterns
(`\fB*\fR' and `\fB?\fR' serve as wildcards). The list can also contain negated
patterns by prefixing the patterns with `\fB!\fR'. If the canonical host name
matches a negated pattern, the key is not accepted.
.sp
The purpose of this option is to give you the option of increasing security:
public key authentication by itself does not trust the network or name servers
or anything but the key. However, if someone manages to steal the key,
possession of the key would permit the intruder to log in from anywhere in the
world. This option makes using a stolen key more difficult, because name
servers and routers would have to be compromised, in addition to just the key.
.RE

.sp
.ne 2
.na
\fB\fBcommand="\fIcommand\fR"\fR\fR
.ad
.sp .6
.RS 4n
Specifies that the \fIcommand\fR is executed whenever this key is used for
authentication. The command supplied by the user (if any) is ignored. The
command is run on a \fBpty\fR if the client requests a \fBpty\fR; otherwise it
is run without a \fBtty\fR. If an 8-bit clean channel is required, one must not
request a \fBpty\fR or should specify \fBno-pty\fR. You can include a quote in
the command by escaping it with a backslash. This option might be useful to
restrict certain public keys from performing a specific operation. An example
is a key that permits remote backups but nothing else. Note that the client can
specify TCP/IP and/or X11 forwarding unless they are explicitly prohibited from
doing so. Also note that this option applies to shell, command, or subsystem
execution.
.RE

.sp
.ne 2
.na
\fB\fBenvironment="\fINAME\fR=\fIvalue\fR"\fR\fR
.ad
.sp .6
.RS 4n
Specifies that the string \fINAME\fR=\fIvalue\fR is to be added to the
environment when logging in using this key. Environment variables set this way
override other default environment values. Multiple options of this type are
permitted. Environment processing is disabled by default and is controlled via
the \fBPermitUserEnvironment\fR option.
.RE

.sp
.ne 2
.na
\fB\fBno-port-forwarding\fR\fR
.ad
.sp .6
.RS 4n
Forbids TCP/IP forwarding when this key is used for authentication. Any port
forward requests by the client will return an error. This might be used, for
example, in connection with the \fBcommand\fR option.
.RE

.sp
.ne 2
.na
\fB\fBno-X11-forwarding\fR\fR
.ad
.sp .6
.RS 4n
Forbids X11 forwarding when this key is used for authentication. Any X11
forward requests by the client will return an error.
.RE

.sp
.ne 2
.na
\fB\fBno-agent-forwarding\fR\fR
.ad
.sp .6
.RS 4n
Forbids authentication agent forwarding when this key is used for
authentication.
.RE

.sp
.ne 2
.na
\fB\fBno-pty\fR\fR
.ad
.sp .6
.RS 4n
Prevents \fBtty\fR allocation (a request to allocate a \fBpty\fR will fail).
.RE

.sp
.ne 2
.na
\fB\fBpermitopen="\fIhost\fR:\fIport\fR"\fR\fR
.ad
.sp .6
.RS 4n
Limit local \fBssh\fR \fB-L\fR port forwarding such that it can connect only to
the specified host and port. IPv6 addresses can be specified with an
alternative syntax: \fIhost\fR/\fIport\fR. You can invoke multiple
\fBpermitopen\fR options, with each instance separated by a comma. No pattern
matching is performed on the specified hostnames. They must be literal domains
or addresses.
.RE

.SS "\fBssh_known_hosts\fR File Format"
.sp
.LP
The \fB/etc/ssh/ssh_known_hosts\fR and \fB$HOME/.ssh/known_hosts\fR files
contain host public keys for all known hosts. The global file should be
prepared by the administrator (optional), and the per-user file is maintained
automatically: whenever the user connects from an unknown host its key is added
to the per-user file.
.sp
.LP
For the RSA key for protocol version 1, these files consist of the following
space-separated fields:
.sp
.in +2
.nf
\fIhostnames\fR  \fIbits\fR  \fIexponent\fR  \fImodulus\fR  \fIcomment\fR
.fi
.in -2
.sp

.sp
.LP
For the public key for protocol version 2, these files consist of the following
space-separated fields:
.sp
.in +2
.nf
\fIhostnames\fR \fIkey-type\fR \fIbase64-encoding-key\fR \fIcomment\fR
.fi
.in -2
.sp

.sp
.LP
For protocol version 2, \fIkey-type\fR is one of \fBssh-rsa\fR or
\fBssh-dsa\fR.
.sp
.LP
Hostnames is a comma-separated list of patterns (\fB*\fR and \fB?\fR act as
wildcards); each pattern in turn is matched against the canonical host name
(when authenticating a client) or against the user-supplied name (when
authenticating a server). A pattern can also be preceded by \fB!\fR to indicate
negation: if the host name matches a negated pattern, it is not accepted (by
that line) even if it matched another pattern on the line.
.sp
.LP
Alternately, hostnames can be stored in a hashed form, which hides host names
and addresses should the file's contents be disclosed. Hashed hostnames start
with a vertical bar (\fB|\fR) character. Only one hashed hostname can appear on
a single line and none of the above negation or wildcard operators may be
applied.
.sp
.LP
Bits, exponent, and modulus are taken directly from the RSA host key; they can
be obtained, for example, from \fB/etc/ssh/ssh_host_rsa_key.pub\fR. The
optional comment field continues to the end of the line, and is not used.
.sp
.LP
Lines starting with a hash mark (\fB#\fR) and empty lines are ignored as
comments.
.sp
.LP
When performing host authentication, authentication is accepted if any matching
line has the proper key. It is thus permissible (but not recommended) to have
several lines or different host keys for the same names. This will inevitably
happen when short forms of host names from different domains are put in the
file. It is possible that the files contain conflicting information;
authentication is accepted if valid information can be found from either file.
.sp
.LP
The lines in these files are typically hundreds of characters long. You should
definitely not type in the host keys by hand. Rather, generate them by a script
or by taking \fB/etc/ssh/ssh_host_rsa_key.pub\fR and adding the host names at
the front.
.SH ENVIRONMENT VARIABLES
.sp
.LP
\fBsshd\fR sets the following environment variables for commands executed by
\fBssh\fR users:
.sp
.ne 2
.na
\fB\fBDISPLAY\fR\fR
.ad
.sp .6
.RS 4n
Indicates the location of the X11 server. It is automatically set by \fBsshd\fR
to point to a value of the form \fIhostname\fR:\fIn\fR, where \fIhostname\fR
indicates the host where the shell runs, and \fIn\fR is an integer greater than
or equal to 1. \fBssh\fR uses this special value to forward X11 connections
over the secure channel. Unless you have important reasons to do otherwise, you
should not set \fBDISPLAY\fR explicitly, as that will render the X11 connection
insecure and will require you to manually copy any required authorization
cookies.
.RE

.sp
.ne 2
.na
\fB\fBHOME\fR\fR
.ad
.sp .6
.RS 4n
Set to the path of the user's home directory.
.RE

.sp
.ne 2
.na
\fB\fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR,
\fBLC_MESSAGES\fR, \fBLC_MONETARY\fR, \fBLC_NUMERIC\fR, \fBLC_TIME\fR\fR
.ad
.sp .6
.RS 4n
A locale setting. The locale defaults to that of \fBsshd\fR (usually the
system-wide default locale), or is negotiated between the client and server
during initial key exchange (as per RFC 4253).
.sp
Following initial key exchange, each of the variables can be overriden in the
following sequence:
.RS +4
.TP
1.
If a locale setting is set in a client's environment and that client
supports "Environment Variable Passing" (see RFC 4254), then the setting will
be passed over to the server side.
.RE
.RS +4
.TP
2.
If the public key authentication method was used to authenticate the server
and the \fBPermitUserEnvironment\fR variable in \fBsshd_config\fR(4) is set to
\fByes\fR on the server side, then the setting can be changed through the use
of the \fBenvironment\fR option in the client's \fBAuthorizedKeysFile\fR file.
.RE
.RS +4
.TP
3.
The setting can be change in the client's \fB~/.ssh/environment\fR file on
the server.
.RE
See \fBPermitUserEnvironment\fR in \fBsshd_config\fR(4) as to when the
\fBAuthorizedKeysFile\fR and \fB~/.ssh/environment\fR files are processed and
used for setting the user environment.
.RE

.sp
.ne 2
.na
\fB\fBLOGNAME\fR\fR
.ad
.sp .6
.RS 4n
Synonym for \fBUSER\fR. Set for compatibility with systems that use this
variable.
.RE

.sp
.ne 2
.na
\fB\fBMAIL\fR\fR
.ad
.sp .6
.RS 4n
Set to point to the user's mailbox.
.RE

.sp
.ne 2
.na
\fB\fBSSH_AUTH_SOCK\fR\fR
.ad
.sp .6
.RS 4n
Indicates the path of a \fBunix-domain\fR socket used to communicate with the
agent.
.RE

.sp
.ne 2
.na
\fB\fBSSH_CONNECTION\fR\fR
.ad
.sp .6
.RS 4n
Identifies the client and server ends of the connection. The variable contains
four space-separated values: client IP address, client port number, server IP
address and server port number.
.RE

.sp
.ne 2
.na
\fB\fBSSH_CLIENT\fR\fR
.ad
.sp .6
.RS 4n
Identifies the client end of the connection. The variable contains three
space-separated values: client IP address, client port number, and server port
number.
.RE

.sp
.ne 2
.na
\fB\fBSSH_TTY\fR\fR
.ad
.sp .6
.RS 4n
Set to the name of the \fBtty\fR (path to the device) associated with the
current shell or command. If the current session has no \fBtty\fR, this
variable is not set.
.RE

.sp
.ne 2
.na
\fB\fBTZ\fR\fR
.ad
.sp .6
.RS 4n
Indicates the present timezone, if \fBTIMEZONE\fR is set in
\fB/etc/default/login\fR or if \fBTZ\fR was set when the daemon was started.
.RE

.sp
.ne 2
.na
\fB\fBHZ\fR\fR
.ad
.sp .6
.RS 4n
If set in \fB/etc/default/login\fR, the daemon sets it to the same value.
.RE

.sp
.ne 2
.na
\fB\fBSHELL\fR\fR
.ad
.sp .6
.RS 4n
The user's shell, if \fBALTSHELL=YES\fR in \fB/etc/default/login\fR.
.RE

.sp
.ne 2
.na
\fB\fBPATH\fR\fR
.ad
.sp .6
.RS 4n
Set to the value of \fBPATH\fR or \fBSUPATH\fR (see \fBlogin\fR(1)) in
\fB/etc/default/login\fR, or, if not set, to \fB/usr/bin:/bin\fR.
.RE

.sp
.ne 2
.na
\fB\fBUSER\fR\fR
.ad
.sp .6
.RS 4n
Set to the name of the user logging in.
.RE

.sp
.LP
Additionally, \fBsshd\fR reads \fB$HOME/.ssh/environment\fR and adds lines of
the format \fBVARNAME=\fIvalue\fR\fR to the environment.
.SH EXAMPLES
.sp
.LP
In the following examples, certain lines might wrap due to line length limits
in your display. You should nevertheless consider the wrapped line as a single
line.
.LP
\fBExample 1 \fR\fBauthorized_key\fR File Entries
.sp
.LP
The following are examples of \fBauthorized_key\fR file entries for protocol 1:

.sp
.in +2
.nf
1024 33 12121...312314325 ylo@foo.bar

from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula

command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323 backup.hut.fi
.fi
.in -2
.sp

.LP
\fBExample 2 \fR\fBauthorized_key\fR File Entries for Protocol 2
.sp
.LP
The following are examples of \fBauthorized_key\fR file entries for protocol 2:

.sp
.in +2
.nf
ssh-rsa AAAAB3NzaC1y.....EU88ovYKg4GfclWGCFYTuw8= ylo@foo.bar
from="*.niksula.hut.fi" ssh-rsa AAAAB3NzaC...uw8= ylo@niksula
command="dump /home",no-pty,no-port-forwarding ssh-rsa AA..8= backup.hut.fi
.fi
.in -2
.sp

.LP
\fBExample 3 \fR\fBssh_known_hosts\fR File Entries for Protocol 1
.sp
.LP
The following are examples of \fBssh_known_hosts\fR file entries for protocol
1:

.sp
.in +2
.nf
closenet,closenet.hut.fi,...,130.233.208.41 1024 37 159...93 closenet.hut.fi
.fi
.in -2
.sp

.LP
\fBExample 4 \fR\fBssh_known_hosts\fR File Entries for Protocol 2
.sp
.LP
The following are examples of \fBssh_known_hosts\fR file entries for protocol
2:

.sp
.in +2
.nf
closenet,closenet.hut.fi,...,130.233.208.41 ssh-rsa AA..8= closenet.hut.fi
.fi
.in -2
.sp

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 13n
Successful completion.
.RE

.sp
.ne 2
.na
\fB>\fB0\fR\fR
.ad
.RS 13n
An error occurred.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/default/login\fR\fR
.ad
.sp .6
.RS 4n
Contains defaults for several \fBsshd_config\fR parameters, environment
variables, and other environmental factors.
.sp
The following parameters affect environment variables (see \fBlogin\fR(1) and
descriptions of these variables, above):
.RS +4
.TP
.ie t \(bu
.el o
\fBTIMEZONE\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBHZ\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBALTSHELL\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBPATH\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBSUPATH\fR
.RE
The following \fB/etc/default/login\fR parameters supply default values for
corresponding \fBsshd_config\fR(4) parameters:
.RS +4
.TP
.ie t \(bu
.el o
\fBCONSOLE\fR (see \fBPermitRootLogin\fR in \fBsshd_config\fR(4))
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBPASSREQ\fR (see \fBPermitEmptyPasswords\fR in \fBsshd_config\fR(4))
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBTIMEOUT\fR (see \fBLoginGraceTime\fR in \fBsshd_config\fR(4))
.RE
The following \fB/etc/default/login\fR parameters:
.RS +4
.TP
.ie t \(bu
.el o
\fBUMASK\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBULIMIT\fR
.RE
\&...set the \fBumask\fR(2) and file size limit of, respectively, the shells
and commands spawned by \fBsshd\fR.
.sp
Finally, two \fB/etc/default/login\fR parameters affect the maximum allowed
login attempts per-connection using interactive user authentication methods
(for example, \fBkeyboard-interactive\fR but not \fBpublickey\fR), as per
\fBlogin\fR(1):
.RS +4
.TP
.ie t \(bu
.el o
\fBRETRIES\fR
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fBSYSLOG_FAILED_LOGINS\fR
.RE
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/sshd_config\fR\fR
.ad
.sp .6
.RS 4n
Contains configuration data for \fBsshd\fR. This file should be writable by
root only, but it is recommended (though not necessary) that it be
world-readable.
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/ssh_host_key\fR\fR
.ad
.br
.na
\fB\fB/etc/ssh/ssh_host_dsa_key\fR\fR
.ad
.br
.na
\fB\fB/etc/ssh/ssh_host_rsa_key\fR\fR
.ad
.sp .6
.RS 4n
Contains the private part of the host key. This file should only be owned by
root, readable only by root, and not accessible to others. \fBsshd\fR does not
start if this file is group/world-accessible.
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/ssh_host_key.pub\fR\fR
.ad
.br
.na
\fB\fB/etc/ssh/ssh_host_dsa_key.pub\fR\fR
.ad
.br
.na
\fB\fB/etc/ssh/ssh_host_rsa_key.pub\fR\fR
.ad
.sp .6
.RS 4n
Contains the public part of the host key. This file should be world-readable
but writable only by root. Its contents should match the private part. This
file is not used for encryption; it is provided only for the convenience of the
user so its contents can be copied to known hosts files. These two files are
created using \fBssh-keygen\fR(1).
.RE

.sp
.ne 2
.na
\fB\fB/var/run/sshd.pid\fR\fR
.ad
.sp .6
.RS 4n
Contains the process ID of the \fBsshd\fR listening for connections. If there
are several daemons running concurrently for different ports, this contains the
pid of the one started last. The content of this file is not sensitive; it can
be world-readable. You can use the \fBPidFile\fR keyword in \fBsshd_config\fR
to specify a file other than \fB/var/run/sshd.pid\fR. See \fBsshd_config\fR(4).
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/ssh_known_hosts\fR and \fB$HOME/.ssh/known_hosts\fR\fR
.ad
.sp .6
.RS 4n
These files are consulted when using \fBrhosts\fR with public key host
authentication to check the public key of the host. The key must be listed in
one of these files to be accepted. The client uses the same files to verify
that the remote host is the one it intended to connect. These files should be
writable only by root or the owner. \fB/etc/ssh/ssh_known_hosts\fR should be
world-readable, and \fB$HOME/.ssh/known_hosts\fR can but need not be
world-readable.
.RE

.sp
.ne 2
.na
\fB\fB/etc/nologin\fR\fR
.ad
.sp .6
.RS 4n
If this file exists, \fBsshd\fR refuses to let anyone except root log in. The
contents of the file are displayed to anyone trying to log in, and non-root
connections are refused. The file should be world-readable.
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.ssh/authorized_keys\fR\fR
.ad
.sp .6
.RS 4n
Lists the public keys (RSA or DSA) that can be used to log into the user's
account. This file must be readable by root. This might, on some machines,
imply that it is world-readable if the user's home directory resides on an NFS
volume. It is recommended that it not be accessible by others. The format of
this file is described above. Users will place the contents of their
\fBidentity.pub\fR, \fBid_dsa.pub\fR and/or \fBid_rsa.pub\fR files into this
file, as described in \fBssh-keygen\fR(1).
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.rhosts\fR\fR
.ad
.sp .6
.RS 4n
This file contains host-username pairs, separated by a space, one per line. The
given user on the corresponding host is permitted to log in without password.
The same file is used by \fBrlogind\fR and \fBrshd\fR. The file must be
writable only by the user; it is recommended that it not be accessible by
others. It is also possible to use \fBnetgroups\fR in the file. Either host or
user name may be of the form \fB+@\fIgroupname\fR\fR to specify all hosts or
all users in the group.
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.shosts\fR\fR
.ad
.sp .6
.RS 4n
For \fBssh\fR, this file is exactly the same as for \fB\&.rhosts\fR. However,
this file is not used by \fBrlogin\fR and \fBrshd\fR, so using this permits
access using SSH only.
.RE

.sp
.ne 2
.na
\fB\fB/etc/hosts.equiv\fR\fR
.ad
.sp .6
.RS 4n
This file is used during \fB\&.rhosts\fR authentication. In its simplest form,
this file contains host names, one per line. Users on these hosts are permitted
to log in without a password, provided they have the same user name on both
machines. The host name can also be followed by a user name; such users are
permitted to log in as any user on this machine (except root). Additionally,
the syntax \fB+@\fIgroup\fR\fR can be used to specify netgroups. Negated
entries start with a hyphen (\fB-\fR).
.sp
If the client host/user is successfully matched in this file, login is
automatically permitted, provided the client and server user names are the
same. Additionally, successful RSA host authentication is normally required.
This file must be writable only by root; it is recommended that it be
world-readable.
.sp
Warning: It is almost never a good idea to use user names in \fBhosts.equiv\fR.
Beware that it really means that the named user(s) can log in as anybody, which
includes \fBbin\fR, \fBdaemon\fR, \fBadm\fR, and other accounts that own
critical binaries and directories. For practical purposes, using a user name
grants the user root access. Probably the only valid use for user names is in
negative entries. This warning also applies to \fBrsh\fR/\fBrlogin\fR.
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/moduli\fR\fR
.ad
.sp .6
.RS 4n
A private file.
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/shosts.equiv\fR\fR
.ad
.sp .6
.RS 4n
This file is processed exactly as \fB/etc/hosts.equiv\fR. However, this file
might be useful in environments that want to run both \fBrsh\fR/\fBrlogin\fR
and \fBssh\fR.
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.ssh/environment\fR\fR
.ad
.sp .6
.RS 4n
This file is read into the environment at login (if it exists). It can contain
only empty lines, comment lines (that start with \fB#\fR), and assignment lines
of the form \fB\fIname\fR=\fIvalue\fR\fR. The file should be writable only by
the user; it need not be readable by anyone else. Environment processing is
disabled by default and is controlled by means of the
\fBPermitUserEnvironment\fR option.
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.ssh/rc\fR\fR
.ad
.sp .6
.RS 4n
If this file exists, it is run with \fB/bin/sh\fR after reading the environment
files but before starting the user's shell or command. If X11 spoofing is in
use, this will receive the \fBproto cookie\fR pair in standard input (and
\fBDISPLAY\fR in environment). This must call \fBxauth\fR in that case.
.sp
The primary purpose of \fB$HOME/.ssh/rc\fR is to run any initialization
routines that might be needed before the user's home directory becomes
accessible; AFS is a particular example of such an environment. If this file
exists, it is run with \fB/bin/sh\fR after reading the environment files, but
before starting the user's shell or command. It must not produce any output on
stdout; stderr must be used instead. If X11 forwarding is in use, it will
receive the \fBproto cookie\fR pair in its standard input and \fBDISPLAY\fR in
its environment. The script must call \fBxauth\fR because \fBsshd\fR will not
run \fBxauth\fR automatically to add X11 cookies.
.sp
This file will probably contain some initialization code followed by something
similar to:
.sp
.in +2
.nf
if read proto cookie && [ -n "$DISPLAY" ]
then
  if [ `echo $DISPLAY | cut -c1-10`  =  'localhost:' ]
  then
    # X11UseLocalhost=yes
    echo add unix:`echo $DISPLAY |
    cut -c11-` $proto $cookie
  else
    # X11UseLocalhost=no
    echo add $DISPLAY $proto $cookie
  fi | xauth -q -
fi
.fi
.in -2
.sp

If this file does not exist, \fB/etc/ssh/sshrc\fR is run, and if that does not
exist, \fBxauth\fR is used to store the cookie. \fB$HOME/.ssh/rc\fR should be
writable only by the user, and need not be readable by anyone else.
.RE

.sp
.ne 2
.na
\fB\fB/etc/ssh/sshrc\fR\fR
.ad
.sp .6
.RS 4n
Similar to \fB$HOME/.ssh/rc\fR. This can be used to specify machine-specific
login-time initializations globally. This file should be writable only by root,
and should be world-readable.
.RE

.SH SECURITY
.sp
.LP
\fBsshd\fR supports the use of several user authentication mechanisms: a public
key system where keys are associated with users (through users'
\fBauthorized_keys\fR files), a public key system where keys are associated
with hosts (see the \fBHostbasedAuthentication\fR configuration parameter), a
GSS-API based method (see the \fBGssAuthentication\fR and \fBGssKeyEx\fR
configuration parameters) and three initial authentication methods: \fBnone\fR,
\fBpassword\fR, and a generic prompt/reply protocol,
\fBkeyboard-interactive\fR.
.sp
.LP
\fBsshd\fR negotiates the use of the GSS-API with clients only if it has a
GSS-API acceptor credential for the "host" service. This means that, for
GSS-API based authentication, the server must have a Kerberos V \fBkeytab\fR
entry (see below) or the equivalent for any other GSS-API mechanism that might
be installed.
.sp
.LP
In order for Kerberos authentication to work, a \fBhost/\fR\fI<FQDN>\fR
Kerberos principal must exist for each Fully Qualified Domain Name associated
with the \fBin.sshd\fR server. Each of these \fBhost/\fR\fI<FQDN>\fR principals
must have a \fBkeytab\fR entry in the \fB/etc/krb5/krb5.keytab\fR file on the
\fBin.sshd\fR server. An example principal might be:
.sp
.LP
\fBhost/bigmachine.eng.example.com\fR
.sp
.LP
See \fBkadmin\fR(1M) or \fBgkadmin\fR(1M) for instructions on adding a
principal to a \fBkrb5.keytab\fR file. See \fI\fR for a discussion of Kerberos
authentication.
.sp
.LP
GSS-API authorization is covered in \fBgss_auth_rules\fR(5).
.sp
.LP
\fBsshd\fR uses \fBpam\fR(3PAM) for the three initial authentication methods as
well as for account management, session management, and password management for
all authentication methods.
.sp
.LP
Specifically, \fBsshd\fR calls \fBpam_authenticate()\fR for the "none,"
"password" and "keyboard-interactive" SSHv2 \fBuserauth\fR types, as well as
for for the null and password authentication methods for SSHv1. Other SSHv2
authentication methods do not call \fBpam_authenticate()\fR.
\fBpam_acct_mgmt()\fR is called for each authentication method that succeeds.
.sp
.LP
\fBpam_setcred()\fR and \fBpam_open_session()\fR are called when authentication
succeeds and \fBpam_close_session()\fR is called when connections are closed.
.sp
.LP
\fBpam_open_session()\fR and \fBpam_close_session()\fR are also called when
SSHv2 channels with \fBpty\fRs are opened and closed.
.sp
.LP
Each SSHv2 \fBuserauth\fR type has its own PAM service name:
.sp

.sp
.TS
box;
c | c
l | l .
SSHv2 Userauth	PAM Service Name
_
none	sshd-none
_
password	sshd-password
_
keyboard-interactive	sshd-kbdint
_
pubkey	sshd-pubkey
_
hostbased	sshd-hostbased
_
gssapi-with-mic	sshd-gssapi
_
gssapi-keyex	sshd-gssapi
.TE

.sp
.LP
For SSHv1, \fBsshd-v1\fR is always used.
.sp
.LP
If \fBpam_acct_mgmt()\fR returns \fBPAM_NEW_AUTHTOK_REQD\fR (indicating that
the user's authentication tokens have expired), then \fBsshd\fR forces the use
of "keyboard-interactive" \fBuserauth\fR, if version 2 of the protocol is in
use. The "keyboard-interactive" \fBuserauth\fR will call \fBpam_chauthtok()\fR
if \fBpam_acct_mgmt()\fR once again returns \fBPAM_NEW_AUTHTOK_REQD\fR. By this
means, administrators are able to control what authentication methods are
allowed for SSHv2 on a per-user basis.
.SS "Setting up Host-based Authentication"
.sp
.LP
To establish host-based authentication, you must perform the following steps:
.RS +4
.TP
.ie t \(bu
.el o
Configure the client.
.RE
.RS +4
.TP
.ie t \(bu
.el o
Configure the server.
.RE
.RS +4
.TP
.ie t \(bu
.el o
Publish known hosts.
.RE
.RS +4
.TP
.ie t \(bu
.el o
Make appropriate entries in \fB/etc/ssh/shosts.equiv\fR and \fB~/.shosts\fR.
.RE
.sp
.LP
These steps are expanded in the following paragraphs.
.RS +4
.TP
.ie t \(bu
.el o
On a client machine, in the system-wide client configuration file,
\fB/etc/ssh/ssh_config\fR, you must have the entry:
.sp
.in +2
.nf
HostbasedAuthentication yes
.fi
.in -2

See \fBssh_config\fR(4) and \fBssh-keysign\fR(1M).
.RE
.RS +4
.TP
.ie t \(bu
.el o
On the server, in the system-wide server configuration file,
\fB/etc/ssh/sshd_config\fR, you must have the entry:
.sp
.in +2
.nf
HostbasedAuthentication yes
.fi
.in -2

If per-user \fB\&.shost\fR files are to be allowed (see last step), in the same
file, you must have:
.sp
.in +2
.nf
IgnoreRhosts no
.fi
.in -2

See \fBsshd_config\fR(4) for a description of these keywords.
.RE
.RS +4
.TP
.ie t \(bu
.el o
To publish known hosts, you must have entries for the clients from which users
will be allowed host-based authentication. Make these entries in either or both
of the system-wide file (\fB/etc/ssh/ssh_known_hosts\fR) or the per-user file
(\fB~/.ssh/known_hosts\fR).
.RE
.RS +4
.TP
.ie t \(bu
.el o
Note that \fBsshd\fR uses \fB\&.shosts\fR, not \fB\&.rhosts\fR. If you want the
functionality provided by \fB\&.rhosts\fR, but do not want to use \fBrlogin\fR
or \fBrsh\fR because of their security shortcomings, you can use
\fB\&.shosts\fR in conjunction with \fBsshd\fR. To use this feature, make
appropriate entries in \fB/etc/ssh/shosts.equiv\fR and \fB~/.shosts\fR, in the
format specified in \fBrhosts\fR(4).
.sp
For the vast majority of network environments, \fB\&.shosts\fR is preferred
over \fB\&.rhosts\fR.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.sp
.LP
The interface stability of \fB/etc/ssh/moduli\fR is Private.
.SH SEE ALSO
.sp
.LP
\fBlogin\fR(1), \fBscp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1),
\fBssh-agent\fR(1), \fBssh-keygen\fR(1), \fBsvcs\fR(1), \fBgkadmin\fR(1M),
\fBkadmin\fR(1M), \fBsftp-server\fR(1M), \fBssh-keysign\fR(1M),
\fBsvcadm\fR(1M), \fBpam\fR(3PAM), \fBrhosts\fR(4), \fBssh_config\fR(4),
\fBsshd_config\fR(4), \fBattributes\fR(5), \fBgss_auth_rules\fR(5),
\fBkerberos\fR(5), \fBpam_roles\fR(5), \fBsmf\fR(5)
.sp
.LP
\fI\fR
.SH NOTES
.sp
.LP
The \fBsshd\fR service is managed by the service management facility,
\fBsmf\fR(5), under the service identifier:
.sp
.in +2
.nf
svc:/network/ssh:default
.fi
.in -2
.sp

.sp
.LP
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
status can be queried using the \fBsvcs\fR(1) command.
.sp
.LP
\fBsshd\fR always sets \fBPAM_RHOST\fR and sets \fBPAM_AUSER\fR in the case of
host-based \fBuserauth\fR. This behavior allows for remote logins to roles
using host-based authentication. See \fBpam_roles\fR(5).