summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.in20
-rw-r--r--pathnames.h28
-rw-r--r--session.c10
-rw-r--r--ssh-keyscan.14
-rw-r--r--ssh-rand-helper.c4
-rw-r--r--ssh.126
-rw-r--r--sshd.838
-rw-r--r--sshd_config10
9 files changed, 79 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index 5256d6d60..9936026be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
120020210
2 - (djm) OpenBSD CVS Sync
3 - deraadt@cvs.openbsd.org 2002/02/09 17:37:34
4 [pathnames.h session.c ssh.1 sshd.8 sshd_config ssh-keyscan.1]
5 move ssh config files to /etc/ssh
6 - (djm) Adjust portable Makefile.in tnd ssh-rand-helper.c o match
7
120020208 820020208
2 - (djm) OpenBSD CVS Sync 9 - (djm) OpenBSD CVS Sync
3 - markus@cvs.openbsd.org 2002/02/04 12:15:25 10 - markus@cvs.openbsd.org 2002/02/04 12:15:25
@@ -7534,4 +7541,4 @@
7534 - Wrote replacements for strlcpy and mkdtemp 7541 - Wrote replacements for strlcpy and mkdtemp
7535 - Released 1.0pre1 7542 - Released 1.0pre1
7536 7543
7537$Id: ChangeLog,v 1.1836 2002/02/08 11:07:33 djm Exp $ 7544$Id: ChangeLog,v 1.1837 2002/02/10 07:32:28 djm Exp $
diff --git a/Makefile.in b/Makefile.in
index 73538eac6..54bb6955a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.194 2002/01/23 23:26:44 stevesk Exp $ 1# $Id: Makefile.in,v 1.195 2002/02/10 07:32:29 djm Exp $
2 2
3prefix=@prefix@ 3prefix=@prefix@
4exec_prefix=@exec_prefix@ 4exec_prefix=@exec_prefix@
@@ -19,7 +19,7 @@ SSH_PROGRAM=@bindir@/ssh
19ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass 19ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
20SFTP_SERVER=$(libexecdir)/sftp-server 20SFTP_SERVER=$(libexecdir)/sftp-server
21 21
22PATHS= -DETCDIR=\"$(sysconfdir)\" \ 22PATHS= -DSSHDIR=\"$(sysconfdir)\" \
23 -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ 23 -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
24 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ 24 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
25 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ 25 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
@@ -62,17 +62,17 @@ CONFIGFILES=sshd_config.out ssh_config.out moduli.out
62CONFIGFILES_IN=sshd_config ssh_config moduli 62CONFIGFILES_IN=sshd_config ssh_config moduli
63 63
64PATHSUBS = \ 64PATHSUBS = \
65 -D/etc/ssh_config=$(sysconfdir)/ssh_config \ 65 -D/etc/ssh/ssh_config=$(sysconfdir)/ssh_config \
66 -D/etc/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \ 66 -D/etc/ssh/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \
67 -D/etc/sshd_config=$(sysconfdir)/sshd_config \ 67 -D/etc/ssh/sshd_config=$(sysconfdir)/sshd_config \
68 -D/usr/libexec=$(libexecdir) \ 68 -D/usr/libexec=$(libexecdir) \
69 -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv \ 69 -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv \
70 -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key \ 70 -D/etc/ssh/ssh_host_key=$(sysconfdir)/ssh_host_key \
71 -D/etc/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \ 71 -D/etc/ssh/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \
72 -D/etc/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \ 72 -D/etc/ssh/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \
73 -D/var/run/sshd.pid=$(piddir)/sshd.pid \ 73 -D/var/run/sshd.pid=$(piddir)/sshd.pid \
74 -D/etc/moduli=$(sysconfdir)/moduli \ 74 -D/etc/ssh/moduli=$(sysconfdir)/moduli \
75 -D/etc/sshrc=$(sysconfdir)/sshrc \ 75 -D/etc/ssh/sshrc=$(sysconfdir)/sshrc \
76 -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \ 76 -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
77 -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@ 77 -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@
78 78
diff --git a/pathnames.h b/pathnames.h
index feb2d0cf8..002c313a5 100644
--- a/pathnames.h
+++ b/pathnames.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pathnames.h,v 1.10 2001/12/08 17:49:28 stevesk Exp $ */ 1/* $OpenBSD: pathnames.h,v 1.11 2002/02/09 17:37:34 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -12,8 +12,10 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14 14
15#ifndef ETCDIR
16#define ETCDIR "/etc" 15#define ETCDIR "/etc"
16
17#ifndef SSHDIR
18#define SSHDIR ETCDIR "/ssh"
17#endif 19#endif
18 20
19#ifndef _PATH_SSH_PIDDIR 21#ifndef _PATH_SSH_PIDDIR
@@ -24,22 +26,22 @@
24 * System-wide file containing host keys of known hosts. This file should be 26 * System-wide file containing host keys of known hosts. This file should be
25 * world-readable. 27 * world-readable.
26 */ 28 */
27#define _PATH_SSH_SYSTEM_HOSTFILE ETCDIR "/ssh_known_hosts" 29#define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts"
28/* backward compat for protocol 2 */ 30/* backward compat for protocol 2 */
29#define _PATH_SSH_SYSTEM_HOSTFILE2 ETCDIR "/ssh_known_hosts2" 31#define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2"
30 32
31/* 33/*
32 * Of these, ssh_host_key must be readable only by root, whereas ssh_config 34 * Of these, ssh_host_key must be readable only by root, whereas ssh_config
33 * should be world-readable. 35 * should be world-readable.
34 */ 36 */
35#define _PATH_SERVER_CONFIG_FILE ETCDIR "/sshd_config" 37#define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config"
36#define _PATH_HOST_CONFIG_FILE ETCDIR "/ssh_config" 38#define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config"
37#define _PATH_HOST_KEY_FILE ETCDIR "/ssh_host_key" 39#define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key"
38#define _PATH_HOST_DSA_KEY_FILE ETCDIR "/ssh_host_dsa_key" 40#define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key"
39#define _PATH_HOST_RSA_KEY_FILE ETCDIR "/ssh_host_rsa_key" 41#define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key"
40#define _PATH_DH_MODULI ETCDIR "/moduli" 42#define _PATH_DH_MODULI SSHDIR "/moduli"
41/* Backwards compatibility */ 43/* Backwards compatibility */
42#define _PATH_DH_PRIMES ETCDIR "/primes" 44#define _PATH_DH_PRIMES SSHDIR "/primes"
43 45
44#ifndef _PATH_SSH_PROGRAM 46#ifndef _PATH_SSH_PROGRAM
45#define _PATH_SSH_PROGRAM "/usr/bin/ssh" 47#define _PATH_SSH_PROGRAM "/usr/bin/ssh"
@@ -102,13 +104,13 @@
102 * use. xauth will be run if neither of these exists. 104 * use. xauth will be run if neither of these exists.
103 */ 105 */
104#define _PATH_SSH_USER_RC ".ssh/rc" 106#define _PATH_SSH_USER_RC ".ssh/rc"
105#define _PATH_SSH_SYSTEM_RC ETCDIR "/sshrc" 107#define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc"
106 108
107/* 109/*
108 * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 110 * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use
109 * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 111 * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled.
110 */ 112 */
111#define _PATH_SSH_HOSTS_EQUIV ETCDIR "/shosts.equiv" 113#define _PATH_SSH_HOSTS_EQUIV SSHDIR "/shosts.equiv"
112#define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 114#define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv"
113 115
114/* 116/*
diff --git a/session.c b/session.c
index 431936ac6..441ff8cdb 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.124 2002/02/06 14:37:22 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.125 2002/02/09 17:37:34 deraadt Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1324,8 +1324,8 @@ do_child(Session *s, const char *command)
1324 close(i); 1324 close(i);
1325 1325
1326 /* 1326 /*
1327 * Must take new environment into use so that .ssh/rc, /etc/sshrc and 1327 * Must take new environment into use so that .ssh/rc,
1328 * xauth are run in the proper environment. 1328 * /etc/ssh/sshrc and xauth are run in the proper environment.
1329 */ 1329 */
1330 environ = env; 1330 environ = env;
1331 1331
@@ -1352,8 +1352,8 @@ do_child(Session *s, const char *command)
1352 } 1352 }
1353 1353
1354 /* 1354 /*
1355 * Run $HOME/.ssh/rc, /etc/sshrc, or xauth (whichever is found first 1355 * Run $HOME/.ssh/rc, /etc/ssh/sshrc, or xauth (whichever is found
1356 * in this order). 1356 * first in this order).
1357 */ 1357 */
1358 if (!options.use_login) { 1358 if (!options.use_login) {
1359 /* ignore _PATH_SSH_USER_RC for subsystems */ 1359 /* ignore _PATH_SSH_USER_RC for subsystems */
diff --git a/ssh-keyscan.1 b/ssh-keyscan.1
index 17f73406e..8a6ee1390 100644
--- a/ssh-keyscan.1
+++ b/ssh-keyscan.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keyscan.1,v 1.12 2001/09/05 06:23:07 deraadt Exp $ 1.\" $OpenBSD: ssh-keyscan.1,v 1.13 2002/02/09 17:37:34 deraadt Exp $
2.\" 2.\"
3.\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3.\" Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4.\" 4.\"
@@ -138,7 +138,7 @@ is either
138or 138or
139.Dq ssh-dsa . 139.Dq ssh-dsa .
140.Pp 140.Pp
141.Pa /etc/ssh_known_hosts 141.Pa /etc/ssh/ssh_known_hosts
142.Sh BUGS 142.Sh BUGS
143It generates "Connection closed by remote host" messages on the consoles 143It generates "Connection closed by remote host" messages on the consoles
144of all the machines it scans if the server is older than version 2.9. 144of all the machines it scans if the server is older than version 2.9.
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 3aab6667e..07856e5c3 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,7 @@
39#include "pathnames.h" 39#include "pathnames.h"
40#include "log.h" 40#include "log.h"
41 41
42RCSID("$Id: ssh-rand-helper.c,v 1.4 2002/01/22 10:58:28 djm Exp $"); 42RCSID("$Id: ssh-rand-helper.c,v 1.5 2002/02/10 07:32:30 djm Exp $");
43 43
44/* Number of bytes we write out */ 44/* Number of bytes we write out */
45#define OUTPUT_SEED_SIZE 48 45#define OUTPUT_SEED_SIZE 48
@@ -60,7 +60,7 @@ RCSID("$Id: ssh-rand-helper.c,v 1.4 2002/01/22 10:58:28 djm Exp $");
60 60
61/* Path to PRNG commands list */ 61/* Path to PRNG commands list */
62#ifndef SSH_PRNG_COMMAND_FILE 62#ifndef SSH_PRNG_COMMAND_FILE
63# define SSH_PRNG_COMMAND_FILE ETCDIR "/ssh_prng_cmds" 63# define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds"
64#endif 64#endif
65 65
66 66
diff --git a/ssh.1 b/ssh.1
index c44f4ae2c..180383aaa 100644
--- a/ssh.1
+++ b/ssh.1
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: ssh.1,v 1.146 2002/02/03 22:35:57 stevesk Exp $ 37.\" $OpenBSD: ssh.1,v 1.147 2002/02/09 17:37:34 deraadt Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSH 1 39.Dt SSH 1
40.Os 40.Os
@@ -126,7 +126,7 @@ or
126.Pa /etc/shosts.equiv , 126.Pa /etc/shosts.equiv ,
127and if additionally the server can verify the client's 127and if additionally the server can verify the client's
128host key (see 128host key (see
129.Pa /etc/ssh_known_hosts 129.Pa /etc/ssh/ssh_known_hosts
130and 130and
131.Pa $HOME/.ssh/known_hosts 131.Pa $HOME/.ssh/known_hosts
132in the 132in the
@@ -365,7 +365,7 @@ Host keys are stored in
365.Pa $HOME/.ssh/known_hosts 365.Pa $HOME/.ssh/known_hosts
366in the user's home directory. 366in the user's home directory.
367Additionally, the file 367Additionally, the file
368.Pa /etc/ssh_known_hosts 368.Pa /etc/ssh/ssh_known_hosts
369is automatically checked for known hosts. 369is automatically checked for known hosts.
370Any new hosts are automatically added to the user's file. 370Any new hosts are automatically added to the user's file.
371If a host's identification 371If a host's identification
@@ -574,7 +574,7 @@ option below.
574Specifies an alternative per-user configuration file. 574Specifies an alternative per-user configuration file.
575If a configuration file is given on the command line, 575If a configuration file is given on the command line,
576the system-wide configuration file 576the system-wide configuration file
577.Pq Pa /etc/ssh_config 577.Pq Pa /etc/ssh/ssh_config
578will be ignored. 578will be ignored.
579The default for the per-user configuration file is 579The default for the per-user configuration file is
580.Pa $HOME/.ssh/config . 580.Pa $HOME/.ssh/config .
@@ -649,7 +649,7 @@ the following order:
649command line options, user's configuration file 649command line options, user's configuration file
650.Pq Pa $HOME/.ssh/config , 650.Pq Pa $HOME/.ssh/config ,
651and system-wide configuration file 651and system-wide configuration file
652.Pq Pa /etc/ssh_config . 652.Pq Pa /etc/ssh/ssh_config .
653For each parameter, the first obtained value 653For each parameter, the first obtained value
654will be used. 654will be used.
655The configuration files contain sections bracketed by 655The configuration files contain sections bracketed by
@@ -887,7 +887,7 @@ The default is
887.It Cm GlobalKnownHostsFile 887.It Cm GlobalKnownHostsFile
888Specifies a file to use for the global 888Specifies a file to use for the global
889host key database instead of 889host key database instead of
890.Pa /etc/ssh_known_hosts . 890.Pa /etc/ssh/ssh_known_hosts .
891.It Cm HostbasedAuthentication 891.It Cm HostbasedAuthentication
892Specifies whether to try rhosts based authentication with public key 892Specifies whether to try rhosts based authentication with public key
893authentication. 893authentication.
@@ -1145,7 +1145,7 @@ will never automatically add host keys to the
1145file, and refuses to connect to hosts whose host key has changed. 1145file, and refuses to connect to hosts whose host key has changed.
1146This provides maximum protection against trojan horse attacks, 1146This provides maximum protection against trojan horse attacks,
1147however, can be annoying when the 1147however, can be annoying when the
1148.Pa /etc/ssh_known_hosts 1148.Pa /etc/ssh/ssh_known_hosts
1149file is poorly maintained, or connections to new hosts are 1149file is poorly maintained, or connections to new hosts are
1150frequently made. 1150frequently made.
1151This option forces the user to manually 1151This option forces the user to manually
@@ -1313,7 +1313,7 @@ to the environment.
1313.It Pa $HOME/.ssh/known_hosts 1313.It Pa $HOME/.ssh/known_hosts
1314Records host keys for all hosts the user has logged into that are not 1314Records host keys for all hosts the user has logged into that are not
1315in 1315in
1316.Pa /etc/ssh_known_hosts . 1316.Pa /etc/ssh/ssh_known_hosts .
1317See 1317See
1318.Xr sshd 8 . 1318.Xr sshd 8 .
1319.It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa, $HOME/.ssh/id_rsa 1319.It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa, $HOME/.ssh/id_rsa
@@ -1368,7 +1368,7 @@ In the simplest form the format is the same as the .pub
1368identity files. 1368identity files.
1369This file is not highly sensitive, but the recommended 1369This file is not highly sensitive, but the recommended
1370permissions are read/write for the user, and not accessible by others. 1370permissions are read/write for the user, and not accessible by others.
1371.It Pa /etc/ssh_known_hosts 1371.It Pa /etc/ssh/ssh_known_hosts
1372Systemwide list of known host keys. 1372Systemwide list of known host keys.
1373This file should be prepared by the 1373This file should be prepared by the
1374system administrator to contain the public host keys of all machines in the 1374system administrator to contain the public host keys of all machines in the
@@ -1391,13 +1391,13 @@ to verify the client host when logging in; other names are needed because
1391does not convert the user-supplied name to a canonical name before 1391does not convert the user-supplied name to a canonical name before
1392checking the key, because someone with access to the name servers 1392checking the key, because someone with access to the name servers
1393would then be able to fool host authentication. 1393would then be able to fool host authentication.
1394.It Pa /etc/ssh_config 1394.It Pa /etc/ssh/ssh_config
1395Systemwide configuration file. 1395Systemwide configuration file.
1396This file provides defaults for those 1396This file provides defaults for those
1397values that are not specified in the user's configuration file, and 1397values that are not specified in the user's configuration file, and
1398for those users who do not have a configuration file. 1398for those users who do not have a configuration file.
1399This file must be world-readable. 1399This file must be world-readable.
1400.It Pa /etc/ssh_host_key, /etc/ssh_host_dsa_key, /etc/ssh_host_rsa_key 1400.It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key
1401These three files contain the private parts of the host keys 1401These three files contain the private parts of the host keys
1402and are used for 1402and are used for
1403.Cm RhostsRSAAuthentication 1403.Cm RhostsRSAAuthentication
@@ -1432,7 +1432,7 @@ Note that by default
1432will be installed so that it requires successful RSA host 1432will be installed so that it requires successful RSA host
1433authentication before permitting \s+2.\s0rhosts authentication. 1433authentication before permitting \s+2.\s0rhosts authentication.
1434If the server machine does not have the client's host key in 1434If the server machine does not have the client's host key in
1435.Pa /etc/ssh_known_hosts , 1435.Pa /etc/ssh/ssh_known_hosts ,
1436it can be stored in 1436it can be stored in
1437.Pa $HOME/.ssh/known_hosts . 1437.Pa $HOME/.ssh/known_hosts .
1438The easiest way to do this is to 1438The easiest way to do this is to
@@ -1469,7 +1469,7 @@ This file is processed exactly as
1469This file may be useful to permit logins using 1469This file may be useful to permit logins using
1470.Nm 1470.Nm
1471but not using rsh/rlogin. 1471but not using rsh/rlogin.
1472.It Pa /etc/sshrc 1472.It Pa /etc/ssh/sshrc
1473Commands in this file are executed by 1473Commands in this file are executed by
1474.Nm 1474.Nm
1475when the user logs in just before the user's shell (or command) is started. 1475when the user logs in just before the user's shell (or command) is started.
diff --git a/sshd.8 b/sshd.8
index ea5dd03e2..ca024a565 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: sshd.8,v 1.166 2002/02/03 22:35:57 stevesk Exp $ 37.\" $OpenBSD: sshd.8,v 1.167 2002/02/09 17:37:34 deraadt Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -198,7 +198,7 @@ will send the output to the standard error instead of the system log.
198.It Fl f Ar configuration_file 198.It Fl f Ar configuration_file
199Specifies the name of the configuration file. 199Specifies the name of the configuration file.
200The default is 200The default is
201.Pa /etc/sshd_config . 201.Pa /etc/ssh/sshd_config .
202.Nm 202.Nm
203refuses to start if there is no configuration file. 203refuses to start if there is no configuration file.
204.It Fl g Ar login_grace_time 204.It Fl g Ar login_grace_time
@@ -214,11 +214,11 @@ This option must be given if
214is not run as root (as the normal 214is not run as root (as the normal
215host key files are normally not readable by anyone but root). 215host key files are normally not readable by anyone but root).
216The default is 216The default is
217.Pa /etc/ssh_host_key 217.Pa /etc/ssh/ssh_host_key
218for protocol version 1, and 218for protocol version 1, and
219.Pa /etc/ssh_host_rsa_key 219.Pa /etc/ssh/ssh_host_rsa_key
220and 220and
221.Pa /etc/ssh_host_dsa_key 221.Pa /etc/ssh/ssh_host_dsa_key
222for protocol version 2. 222for protocol version 2.
223It is possible to have multiple host key files for 223It is possible to have multiple host key files for
224the different protocol versions and host key algorithms. 224the different protocol versions and host key algorithms.
@@ -311,7 +311,7 @@ to use IPv6 addresses only.
311.Sh CONFIGURATION FILE 311.Sh CONFIGURATION FILE
312.Nm 312.Nm
313reads configuration data from 313reads configuration data from
314.Pa /etc/sshd_config 314.Pa /etc/ssh/sshd_config
315(or the file specified with 315(or the file specified with
316.Fl f 316.Fl f
317on the command line). 317on the command line).
@@ -488,11 +488,11 @@ The default is
488Specifies a file containing a private host key 488Specifies a file containing a private host key
489used by SSH. 489used by SSH.
490The default is 490The default is
491.Pa /etc/ssh_host_key 491.Pa /etc/ssh/ssh_host_key
492for protocol version 1, and 492for protocol version 1, and
493.Pa /etc/ssh_host_rsa_key 493.Pa /etc/ssh/ssh_host_rsa_key
494and 494and
495.Pa /etc/ssh_host_dsa_key 495.Pa /etc/ssh/ssh_host_dsa_key
496for protocol version 2. 496for protocol version 2.
497Note that 497Note that
498.Nm 498.Nm
@@ -1103,7 +1103,7 @@ command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hu
1103permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23.\|.\|.\|2323 1103permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23.\|.\|.\|2323
1104.Sh SSH_KNOWN_HOSTS FILE FORMAT 1104.Sh SSH_KNOWN_HOSTS FILE FORMAT
1105The 1105The
1106.Pa /etc/ssh_known_hosts , 1106.Pa /etc/ssh/ssh_known_hosts ,
1107and 1107and
1108.Pa $HOME/.ssh/known_hosts 1108.Pa $HOME/.ssh/known_hosts
1109files contain host public keys for all known hosts. 1109files contain host public keys for all known hosts.
@@ -1128,7 +1128,7 @@ pattern on the line.
1128.Pp 1128.Pp
1129Bits, exponent, and modulus are taken directly from the RSA host key; they 1129Bits, exponent, and modulus are taken directly from the RSA host key; they
1130can be obtained, e.g., from 1130can be obtained, e.g., from
1131.Pa /etc/ssh_host_key.pub . 1131.Pa /etc/ssh/ssh_host_key.pub .
1132The optional comment field continues to the end of the line, and is not used. 1132The optional comment field continues to the end of the line, and is not used.
1133.Pp 1133.Pp
1134Lines starting with 1134Lines starting with
@@ -1150,7 +1150,7 @@ Note that the lines in these files are typically hundreds of characters
1150long, and you definitely don't want to type in the host keys by hand. 1150long, and you definitely don't want to type in the host keys by hand.
1151Rather, generate them by a script 1151Rather, generate them by a script
1152or by taking 1152or by taking
1153.Pa /etc/ssh_host_key.pub 1153.Pa /etc/ssh/ssh_host_key.pub
1154and adding the host names at the front. 1154and adding the host names at the front.
1155.Ss Examples 1155.Ss Examples
1156.Bd -literal 1156.Bd -literal
@@ -1159,19 +1159,19 @@ cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....=
1159.Ed 1159.Ed
1160.Sh FILES 1160.Sh FILES
1161.Bl -tag -width Ds 1161.Bl -tag -width Ds
1162.It Pa /etc/sshd_config 1162.It Pa /etc/ssh/sshd_config
1163Contains configuration data for 1163Contains configuration data for
1164.Nm sshd . 1164.Nm sshd .
1165This file should be writable by root only, but it is recommended 1165This file should be writable by root only, but it is recommended
1166(though not necessary) that it be world-readable. 1166(though not necessary) that it be world-readable.
1167.It Pa /etc/ssh_host_key, /etc/ssh_host_dsa_key, /etc/ssh_host_rsa_key 1167.It Pa /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key
1168These three files contain the private parts of the host keys. 1168These three files contain the private parts of the host keys.
1169These files should only be owned by root, readable only by root, and not 1169These files should only be owned by root, readable only by root, and not
1170accessible to others. 1170accessible to others.
1171Note that 1171Note that
1172.Nm 1172.Nm
1173does not start if this file is group/world-accessible. 1173does not start if this file is group/world-accessible.
1174.It Pa /etc/ssh_host_key.pub, /etc/ssh_host_dsa_key.pub, /etc/ssh_host_rsa_key.pub 1174.It Pa /etc/ssh/ssh_host_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_rsa_key.pub
1175These three files contain the public parts of the host keys. 1175These three files contain the public parts of the host keys.
1176These files should be world-readable but writable only by 1176These files should be world-readable but writable only by
1177root. 1177root.
@@ -1204,7 +1204,7 @@ and/or
1204.Pa id_rsa.pub 1204.Pa id_rsa.pub
1205files into this file, as described in 1205files into this file, as described in
1206.Xr ssh-keygen 1 . 1206.Xr ssh-keygen 1 .
1207.It Pa "/etc/ssh_known_hosts" and "$HOME/.ssh/known_hosts" 1207.It Pa "/etc/ssh/ssh_known_hosts" and "$HOME/.ssh/known_hosts"
1208These files are consulted when using rhosts with RSA host 1208These files are consulted when using rhosts with RSA host
1209authentication or protocol version 2 hostbased authentication 1209authentication or protocol version 2 hostbased authentication
1210to check the public key of the host. 1210to check the public key of the host.
@@ -1212,7 +1212,7 @@ The key must be listed in one of these files to be accepted.
1212The client uses the same files 1212The client uses the same files
1213to verify that it is connecting to the correct remote host. 1213to verify that it is connecting to the correct remote host.
1214These files should be writable only by root/the owner. 1214These files should be writable only by root/the owner.
1215.Pa /etc/ssh_known_hosts 1215.Pa /etc/ssh/ssh_known_hosts
1216should be world-readable, and 1216should be world-readable, and
1217.Pa $HOME/.ssh/known_hosts 1217.Pa $HOME/.ssh/known_hosts
1218can but need not be world-readable. 1218can but need not be world-readable.
@@ -1320,13 +1320,13 @@ something similar to:
1320.Ed 1320.Ed
1321.Pp 1321.Pp
1322If this file does not exist, 1322If this file does not exist,
1323.Pa /etc/sshrc 1323.Pa /etc/ssh/sshrc
1324is run, and if that 1324is run, and if that
1325does not exist either, xauth is used to store the cookie. 1325does not exist either, xauth is used to store the cookie.
1326.Pp 1326.Pp
1327This file should be writable only by the user, and need not be 1327This file should be writable only by the user, and need not be
1328readable by anyone else. 1328readable by anyone else.
1329.It Pa /etc/sshrc 1329.It Pa /etc/ssh/sshrc
1330Like 1330Like
1331.Pa $HOME/.ssh/rc . 1331.Pa $HOME/.ssh/rc .
1332This can be used to specify 1332This can be used to specify
diff --git a/sshd_config b/sshd_config
index ee2e6ac89..e05e24cc6 100644
--- a/sshd_config
+++ b/sshd_config
@@ -1,4 +1,4 @@
1# $OpenBSD: sshd_config,v 1.46 2002/01/29 14:32:03 markus Exp $ 1# $OpenBSD: sshd_config,v 1.47 2002/02/09 17:37:34 deraadt Exp $
2 2
3# This is the sshd server system-wide configuration file. See sshd(8) 3# This is the sshd server system-wide configuration file. See sshd(8)
4# for more information. 4# for more information.
@@ -16,10 +16,10 @@
16#ListenAddress :: 16#ListenAddress ::
17 17
18# HostKey for protocol version 1 18# HostKey for protocol version 1
19#HostKey /etc/ssh_host_key 19#HostKey /etc/ssh/ssh_host_key
20# HostKeys for protocol version 2 20# HostKeys for protocol version 2
21#HostKey /etc/ssh_host_rsa_key 21#HostKey /etc/ssh/ssh_host_rsa_key
22#HostKey /etc/ssh_host_dsa_key 22#HostKey /etc/ssh/ssh_host_dsa_key
23 23
24# Lifetime and size of ephemeral version 1 server key 24# Lifetime and size of ephemeral version 1 server key
25#KeyRegenerationInterval 3600 25#KeyRegenerationInterval 3600
@@ -44,7 +44,7 @@
44#RhostsAuthentication no 44#RhostsAuthentication no
45# Don't read the user's ~/.rhosts and ~/.shosts files 45# Don't read the user's ~/.rhosts and ~/.shosts files
46#IgnoreRhosts yes 46#IgnoreRhosts yes
47# For this to work you will also need host keys in /etc/ssh_known_hosts 47# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
48#RhostsRSAAuthentication no 48#RhostsRSAAuthentication no
49# similar for protocol version 2 49# similar for protocol version 2
50#HostbasedAuthentication no 50#HostbasedAuthentication no