=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh_config.5,v retrieving revision 1.325 retrieving revision 1.326 diff -u -r1.325 -r1.326 --- src/usr.bin/ssh/ssh_config.5 2020/04/11 20:20:09 1.325 +++ src/usr.bin/ssh/ssh_config.5 2020/05/29 04:25:40 1.326 @@ -33,8 +33,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: ssh_config.5,v 1.325 2020/04/11 20:20:09 jmc Exp $ -.Dd $Mdocdate: April 11 2020 $ +.\" $OpenBSD: ssh_config.5,v 1.326 2020/05/29 04:25:40 dtucker Exp $ +.Dd $Mdocdate: May 29 2020 $ .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -389,9 +389,11 @@ .Pp Arguments to .Cm CertificateFile -may use the tilde syntax to refer to a user's home directory -or the tokens described in the +may use the tilde syntax to refer to a user's home directory, +the tokens described in the .Sx TOKENS +section and environment variables as described in the +.Sx ENVIRONMENT VARIABLES section. .Pp It is possible to have multiple certificate files specified in @@ -551,9 +553,11 @@ to disable connection sharing. Arguments to .Cm ControlPath -may use the tilde syntax to refer to a user's home directory -or the tokens described in the +may use the tilde syntax to refer to a user's home directory, +the tokens described in the .Sx TOKENS +section and environment variables as described in the +.Sx ENVIRONMENT VARIABLES section. It is recommended that any .Cm ControlPath @@ -934,9 +938,11 @@ .Pp Arguments to .Cm IdentityAgent -may use the tilde syntax to refer to a user's home directory -or the tokens described in the +may use the tilde syntax to refer to a user's home directory, +the tokens described in the .Sx TOKENS +section and environment variables as described in the +.Sx ENVIRONMENT VARIABLES section. .It Cm IdentityFile Specifies a file from which the user's DSA, ECDSA, authenticator-hosted ECDSA, @@ -1153,8 +1159,10 @@ empty address or .Sq * indicates that the port should be available from all interfaces. -Unix domain socket paths accept the tokens described in the +Unix domain socket paths may use the tokens described in the .Sx TOKENS +section and environment variables as described in the +.Sx ENVIRONMENT VARIABLES section. .It Cm LogLevel Gives the verbosity level that is used when logging messages from @@ -1424,8 +1432,10 @@ forwardings can be given on the command line. Privileged ports can be forwarded only when logging in as root on the remote machine. -Unix domain socket paths accept the tokens described in the +Unix domain socket paths may use the tokens described in the .Sx TOKENS +section and environment variables as described in the +.Sx ENVIRONMENT VARIABLES section. .Pp If the @@ -1876,6 +1886,29 @@ .Pp .Cm ProxyCommand accepts the tokens %%, %h, %n, %p, and %r. +.Sh ENVIRONMENT VARIABLES +Arguments to some keywords can be expanded at runtime from environment +variables on the client by enclosing them in +.Ic ${} , +for example +.Ic ${HOME}/.ssh +would refer to the user's .ssh directory. +If a specified environment variable does not exist then an error will be +returned and the setting for that keyword will be ignored. +.Pp +The keywords +.El +.Cm CertificateFile , +.Cm ControlPath , +.Cm IdentityAgent +and +.Cm IdentityFile +support environment variables. +The keywords +.Cm LocalForward +and +.Cm RemoteForward +support environment variables only for Unix domain socket paths. .Sh FILES .Bl -tag -width Ds .It Pa ~/.ssh/config