1263970Sdes/* $OpenBSD: pathnames.h,v 1.24 2013/12/06 13:39:49 markus Exp $ */ 2263970Sdes/* $FreeBSD$ */ 376259Sgreen 476259Sgreen/* 576259Sgreen * Author: Tatu Ylonen <ylo@cs.hut.fi> 676259Sgreen * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 776259Sgreen * All rights reserved 876259Sgreen * 976259Sgreen * As far as I am concerned, the code I have written for this software 1076259Sgreen * can be used freely for any purpose. Any derived versions of this 1176259Sgreen * software must be clearly marked as such, and if the derived work is 1276259Sgreen * incompatible with the protocol description in the RFC file, it must be 1376259Sgreen * called by a name other than "ssh" or "Secure Shell". 1476259Sgreen */ 1576259Sgreen 1692559Sdes#define ETCDIR "/etc" 1798941Sdes 1898941Sdes#ifndef SSHDIR 1992559Sdes#define SSHDIR ETCDIR "/ssh" 2098941Sdes#endif 2198941Sdes 2298941Sdes#ifndef _PATH_SSH_PIDDIR 2376259Sgreen#define _PATH_SSH_PIDDIR "/var/run" 2498941Sdes#endif 2576259Sgreen 2676259Sgreen/* 2776259Sgreen * System-wide file containing host keys of known hosts. This file should be 2876259Sgreen * world-readable. 2976259Sgreen */ 3092559Sdes#define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts" 3192559Sdes/* backward compat for protocol 2 */ 3292559Sdes#define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2" 3376259Sgreen 3476259Sgreen/* 3576259Sgreen * Of these, ssh_host_key must be readable only by root, whereas ssh_config 3676259Sgreen * should be world-readable. 3776259Sgreen */ 3892559Sdes#define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" 3992559Sdes#define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" 4092559Sdes#define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" 4192559Sdes#define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key" 42221420Sdes#define _PATH_HOST_ECDSA_KEY_FILE SSHDIR "/ssh_host_ecdsa_key" 43263970Sdes#define _PATH_HOST_ED25519_KEY_FILE SSHDIR "/ssh_host_ed25519_key" 4492559Sdes#define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key" 4592559Sdes#define _PATH_DH_MODULI SSHDIR "/moduli" 4692559Sdes/* Backwards compatibility */ 4792559Sdes#define _PATH_DH_PRIMES SSHDIR "/primes" 4876259Sgreen 4998941Sdes#ifndef _PATH_SSH_PROGRAM 5076259Sgreen#define _PATH_SSH_PROGRAM "/usr/bin/ssh" 5198941Sdes#endif 5276259Sgreen 5376259Sgreen/* 5476259Sgreen * The process id of the daemon listening for connections is saved here to 5576259Sgreen * make it easier to kill the correct daemon when necessary. 5676259Sgreen */ 5776259Sgreen#define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" 5876259Sgreen 5976259Sgreen/* 60192595Sdes * The directory in user's home directory in which the files reside. The 6176259Sgreen * directory should be world-readable (though not all files are). 6276259Sgreen */ 6376259Sgreen#define _PATH_SSH_USER_DIR ".ssh" 6476259Sgreen 6576259Sgreen/* 6676259Sgreen * Per-user file containing host keys of known hosts. This file need not be 6776259Sgreen * readable by anyone except the user him/herself, though this does not 6876259Sgreen * contain anything particularly secret. 6976259Sgreen */ 70263970Sdes#define _PATH_SSH_USER_HOSTFILE "~/" _PATH_SSH_USER_DIR "/known_hosts" 7192559Sdes/* backward compat for protocol 2 */ 72263970Sdes#define _PATH_SSH_USER_HOSTFILE2 "~/" _PATH_SSH_USER_DIR "/known_hosts2" 7376259Sgreen 7476259Sgreen/* 7576259Sgreen * Name of the default file containing client-side authentication key. This 7676259Sgreen * file should only be readable by the user him/herself. 7776259Sgreen */ 78263970Sdes#define _PATH_SSH_CLIENT_IDENTITY _PATH_SSH_USER_DIR "/identity" 79263970Sdes#define _PATH_SSH_CLIENT_ID_DSA _PATH_SSH_USER_DIR "/id_dsa" 80263970Sdes#define _PATH_SSH_CLIENT_ID_ECDSA _PATH_SSH_USER_DIR "/id_ecdsa" 81263970Sdes#define _PATH_SSH_CLIENT_ID_RSA _PATH_SSH_USER_DIR "/id_rsa" 82263970Sdes#define _PATH_SSH_CLIENT_ID_ED25519 _PATH_SSH_USER_DIR "/id_ed25519" 8376259Sgreen 8476259Sgreen/* 85192595Sdes * Configuration file in user's home directory. This file need not be 8676259Sgreen * readable by anyone but the user him/herself, but does not contain anything 87192595Sdes * particularly secret. If the user's home directory resides on an NFS 8876259Sgreen * volume where root is mapped to nobody, this may need to be world-readable. 8976259Sgreen */ 90263970Sdes#define _PATH_SSH_USER_CONFFILE _PATH_SSH_USER_DIR "/config" 9176259Sgreen 9276259Sgreen/* 9376259Sgreen * File containing a list of those rsa keys that permit logging in as this 9476259Sgreen * user. This file need not be readable by anyone but the user him/herself, 95192595Sdes * but does not contain anything particularly secret. If the user's home 9676259Sgreen * directory resides on an NFS volume where root is mapped to nobody, this 9776259Sgreen * may need to be world-readable. (This file is read by the daemon which is 9876259Sgreen * running as root.) 9976259Sgreen */ 100263970Sdes#define _PATH_SSH_USER_PERMITTED_KEYS _PATH_SSH_USER_DIR "/authorized_keys" 10192559Sdes 10292559Sdes/* backward compat for protocol v2 */ 103263970Sdes#define _PATH_SSH_USER_PERMITTED_KEYS2 _PATH_SSH_USER_DIR "/authorized_keys2" 10476259Sgreen 10576259Sgreen/* 10676259Sgreen * Per-user and system-wide ssh "rc" files. These files are executed with 10776259Sgreen * /bin/sh before starting the shell or command if they exist. They will be 10876259Sgreen * passed "proto cookie" as arguments if X11 forwarding with spoofing is in 10976259Sgreen * use. xauth will be run if neither of these exists. 11076259Sgreen */ 111263970Sdes#define _PATH_SSH_USER_RC _PATH_SSH_USER_DIR "/rc" 11292559Sdes#define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc" 11376259Sgreen 11476259Sgreen/* 11576259Sgreen * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 11676259Sgreen * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 11776259Sgreen */ 11892559Sdes#define _PATH_SSH_HOSTS_EQUIV SSHDIR "/shosts.equiv" 11976259Sgreen#define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 12076259Sgreen 12176259Sgreen/* 12276259Sgreen * Default location of askpass 12376259Sgreen */ 12498941Sdes#ifndef _PATH_SSH_ASKPASS_DEFAULT 125169966Sdes#define _PATH_SSH_ASKPASS_DEFAULT "/usr/local/bin/ssh-askpass" 12698941Sdes#endif 12776259Sgreen 12898684Sdes/* Location of ssh-keysign for hostbased authentication */ 12998941Sdes#ifndef _PATH_SSH_KEY_SIGN 130137019Sdes#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 13198941Sdes#endif 13298684Sdes 133204917Sdes/* Location of ssh-pkcs11-helper to support keys in tokens */ 134204917Sdes#ifndef _PATH_SSH_PKCS11_HELPER 135204917Sdes#define _PATH_SSH_PKCS11_HELPER "/usr/libexec/ssh-pkcs11-helper" 136204917Sdes#endif 137204917Sdes 13892559Sdes/* xauth for X11 forwarding */ 13998941Sdes#ifndef _PATH_XAUTH 140169966Sdes#define _PATH_XAUTH "/usr/local/bin/xauth" 14198941Sdes#endif 14292559Sdes 14392559Sdes/* UNIX domain socket for X11 server; displaynum will replace %u */ 14498941Sdes#ifndef _PATH_UNIX_X 14592559Sdes#define _PATH_UNIX_X "/tmp/.X11-unix/X%u" 14698941Sdes#endif 14792559Sdes 14898941Sdes/* for scp */ 14998941Sdes#ifndef _PATH_CP 15098941Sdes#define _PATH_CP "cp" 15198941Sdes#endif 15298941Sdes 15376259Sgreen/* for sftp */ 15498941Sdes#ifndef _PATH_SFTP_SERVER 15576259Sgreen#define _PATH_SFTP_SERVER "/usr/libexec/sftp-server" 15698941Sdes#endif 15798684Sdes 15898684Sdes/* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ 15998941Sdes#ifndef _PATH_PRIVSEP_CHROOT_DIR 16098684Sdes#define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" 16198941Sdes#endif 16298941Sdes 163126277Sdes/* for passwd change */ 164126277Sdes#ifndef _PATH_PASSWD_PROG 165126277Sdes#define _PATH_PASSWD_PROG "/usr/bin/passwd" 166126277Sdes#endif 167126277Sdes 16898941Sdes#ifndef _PATH_LS 16998941Sdes#define _PATH_LS "ls" 17098941Sdes#endif 17198941Sdes 17298941Sdes/* path to login program */ 17398941Sdes#ifndef LOGIN_PROGRAM 17498941Sdes# ifdef LOGIN_PROGRAM_FALLBACK 17598941Sdes# define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK 17698941Sdes# else 17798941Sdes# define LOGIN_PROGRAM "/usr/bin/login" 17898941Sdes# endif 17998941Sdes#endif /* LOGIN_PROGRAM */ 18098941Sdes 18198941Sdes/* Askpass program define */ 18298941Sdes#ifndef ASKPASS_PROGRAM 18398941Sdes#define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass" 18498941Sdes#endif /* ASKPASS_PROGRAM */ 185