pathnames.h revision 1.10
155372Smjacob/*	$OpenBSD: pathnames.h,v 1.10 2001/12/08 17:49:28 stevesk Exp $	*/
2139749Simp
355372Smjacob/*
455372Smjacob * Author: Tatu Ylonen <ylo@cs.hut.fi>
555372Smjacob * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
655372Smjacob *                    All rights reserved
755372Smjacob *
855372Smjacob * As far as I am concerned, the code I have written for this software
955372Smjacob * can be used freely for any purpose.  Any derived versions of this
10154704Smjacob * software must be clearly marked as such, and if the derived work is
1155372Smjacob * incompatible with the protocol description in the RFC file, it must be
1255372Smjacob * called by a name other than "ssh" or "Secure Shell".
1355372Smjacob */
1455372Smjacob
1555372Smjacob#define ETCDIR				"/etc"
1655372Smjacob#define _PATH_SSH_PIDDIR		"/var/run"
1755372Smjacob
1855372Smjacob/*
1966189Smjacob * System-wide file containing host keys of known hosts.  This file should be
2055372Smjacob * world-readable.
2155372Smjacob */
2255372Smjacob#define _PATH_SSH_SYSTEM_HOSTFILE	ETCDIR "/ssh_known_hosts"
2355372Smjacob/* backward compat for protocol 2 */
2455372Smjacob#define _PATH_SSH_SYSTEM_HOSTFILE2	ETCDIR "/ssh_known_hosts2"
2555372Smjacob
2655372Smjacob/*
2755372Smjacob * Of these, ssh_host_key must be readable only by root, whereas ssh_config
28154704Smjacob * should be world-readable.
29154704Smjacob */
3055372Smjacob#define _PATH_SERVER_CONFIG_FILE	ETCDIR "/sshd_config"
3155372Smjacob#define _PATH_HOST_CONFIG_FILE		ETCDIR "/ssh_config"
3255372Smjacob#define _PATH_HOST_KEY_FILE		ETCDIR "/ssh_host_key"
3355372Smjacob#define _PATH_HOST_DSA_KEY_FILE		ETCDIR "/ssh_host_dsa_key"
3455372Smjacob#define _PATH_HOST_RSA_KEY_FILE		ETCDIR "/ssh_host_rsa_key"
3574231Smjacob#define _PATH_DH_MODULI			ETCDIR "/moduli"
3674231Smjacob/* Backwards compatibility */
3755372Smjacob#define _PATH_DH_PRIMES			ETCDIR "/primes"
38120016Smjacob
3955372Smjacob#define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
4055372Smjacob
4155372Smjacob/*
4255372Smjacob * The process id of the daemon listening for connections is saved here to
4355372Smjacob * make it easier to kill the correct daemon when necessary.
4455372Smjacob */
4555372Smjacob#define _PATH_SSH_DAEMON_PID_FILE	_PATH_SSH_PIDDIR "/sshd.pid"
4655372Smjacob
4755372Smjacob/*
4855372Smjacob * The directory in user\'s home directory in which the files reside. The
4955372Smjacob * directory should be world-readable (though not all files are).
5055372Smjacob */
5155372Smjacob#define _PATH_SSH_USER_DIR		".ssh"
5255372Smjacob
5355372Smjacob/*
5455372Smjacob * Per-user file containing host keys of known hosts.  This file need not be
5555372Smjacob * readable by anyone except the user him/herself, though this does not
5655372Smjacob * contain anything particularly secret.
5755372Smjacob */
5855372Smjacob#define _PATH_SSH_USER_HOSTFILE		"~/.ssh/known_hosts"
5955372Smjacob/* backward compat for protocol 2 */
6055372Smjacob#define _PATH_SSH_USER_HOSTFILE2	"~/.ssh/known_hosts2"
6155372Smjacob
6255372Smjacob/*
6355372Smjacob * Name of the default file containing client-side authentication key. This
6455372Smjacob * file should only be readable by the user him/herself.
6575195Smjacob */
6655372Smjacob#define _PATH_SSH_CLIENT_IDENTITY	".ssh/identity"
6761771Smjacob#define _PATH_SSH_CLIENT_ID_DSA		".ssh/id_dsa"
6855372Smjacob#define _PATH_SSH_CLIENT_ID_RSA		".ssh/id_rsa"
6955372Smjacob
7055372Smjacob/*
7155372Smjacob * Configuration file in user\'s home directory.  This file need not be
7255372Smjacob * readable by anyone but the user him/herself, but does not contain anything
7355372Smjacob * particularly secret.  If the user\'s home directory resides on an NFS
7455372Smjacob * volume where root is mapped to nobody, this may need to be world-readable.
7555372Smjacob */
7655372Smjacob#define _PATH_SSH_USER_CONFFILE		".ssh/config"
7755372Smjacob
7855372Smjacob/*
7955372Smjacob * File containing a list of those rsa keys that permit logging in as this
8055372Smjacob * user.  This file need not be readable by anyone but the user him/herself,
8155372Smjacob * but does not contain anything particularly secret.  If the user\'s home
8255372Smjacob * directory resides on an NFS volume where root is mapped to nobody, this
8355372Smjacob * may need to be world-readable.  (This file is read by the daemon which is
8455372Smjacob * running as root.)
8555372Smjacob */
8655372Smjacob#define _PATH_SSH_USER_PERMITTED_KEYS	".ssh/authorized_keys"
8755372Smjacob
8855372Smjacob/* backward compat for protocol v2 */
8955372Smjacob#define _PATH_SSH_USER_PERMITTED_KEYS2	".ssh/authorized_keys2"
9055372Smjacob
9155372Smjacob/*
9255372Smjacob * Per-user and system-wide ssh "rc" files.  These files are executed with
9355372Smjacob * /bin/sh before starting the shell or command if they exist.  They will be
9455372Smjacob * passed "proto cookie" as arguments if X11 forwarding with spoofing is in
9555372Smjacob * use.  xauth will be run if neither of these exists.
9655372Smjacob */
9755372Smjacob#define _PATH_SSH_USER_RC		".ssh/rc"
9855372Smjacob#define _PATH_SSH_SYSTEM_RC		ETCDIR "/sshrc"
9955372Smjacob
10055372Smjacob/*
10155372Smjacob * Ssh-only version of /etc/hosts.equiv.  Additionally, the daemon may use
10255372Smjacob * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled.
10355372Smjacob */
10455372Smjacob#define _PATH_SSH_HOSTS_EQUIV		ETCDIR "/shosts.equiv"
10555372Smjacob#define _PATH_RHOSTS_EQUIV		"/etc/hosts.equiv"
10655372Smjacob
10755372Smjacob/*
10855372Smjacob * Default location of askpass
10955372Smjacob */
11055372Smjacob#define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/ssh-askpass"
11155372Smjacob
11255372Smjacob/* xauth for X11 forwarding */
11355372Smjacob#define _PATH_XAUTH			"/usr/X11R6/bin/xauth"
11455372Smjacob
11555372Smjacob/* UNIX domain socket for X11 server; displaynum will replace %u */
11655372Smjacob#define _PATH_UNIX_X "/tmp/.X11-unix/X%u"
11755372Smjacob
11855372Smjacob/* for scp */
11955372Smjacob#define _PATH_CP			"cp"
12055372Smjacob
12155372Smjacob/* for sftp */
122154704Smjacob#define _PATH_SFTP_SERVER		"/usr/libexec/sftp-server"
123154704Smjacob#define _PATH_LS			"ls"
124154704Smjacob