View | Details | Raw Unified | Return to bug 3199
Collapse All | Expand All

(-)a/ssh_config.5 (-1 / +3 lines)
Lines 1846-1851 A literal Link Here
1846
Hash of %l%h%p%r.
1846
Hash of %l%h%p%r.
1847
.It %d
1847
.It %d
1848
Local user's home directory.
1848
Local user's home directory.
1849
.It %f
1850
The preferred address family switch (either -4, -6 or empty).
1849
.It %h
1851
.It %h
1850
The remote hostname.
1852
The remote hostname.
1851
.It %i
1853
.It %i
Lines 1895-1901 accepts the tokens %% and %h. Link Here
1895
accepts all tokens.
1897
accepts all tokens.
1896
.Pp
1898
.Pp
1897
.Cm ProxyCommand
1899
.Cm ProxyCommand
1898
accepts the tokens %%, %h, %n, %p, and %r.
1900
accepts the tokens %%, %f, %h, %n, %p, and %r.
1899
.Sh ENVIRONMENT VARIABLES
1901
.Sh ENVIRONMENT VARIABLES
1900
Arguments to some keywords can be expanded at runtime from environment
1902
Arguments to some keywords can be expanded at runtime from environment
1901
variables on the client by enclosing them in
1903
variables on the client by enclosing them in
(-)a/sshconnect.c (+8 lines)
Lines 91-96 expand_proxy_command(const char *proxy_command, const char *user, Link Here
91
	char *tmp, *ret, strport[NI_MAXSERV];
91
	char *tmp, *ret, strport[NI_MAXSERV];
92
	const char *keyalias = options.host_key_alias ?
92
	const char *keyalias = options.host_key_alias ?
93
	     options.host_key_alias : host_arg;
93
	     options.host_key_alias : host_arg;
94
	const char *family = "";
95
96
	if (options.address_family == AF_INET6) {
97
		family = "-6";
98
	} else if (options.address_family == AF_INET) {
99
		family = "-4";
100
	}
94
101
95
	snprintf(strport, sizeof strport, "%d", port);
102
	snprintf(strport, sizeof strport, "%d", port);
96
	xasprintf(&tmp, "exec %s", proxy_command);
103
	xasprintf(&tmp, "exec %s", proxy_command);
Lines 100-105 expand_proxy_command(const char *proxy_command, const char *user, Link Here
100
	    "n", host_arg,
107
	    "n", host_arg,
101
	    "p", strport,
108
	    "p", strport,
102
	    "r", options.user,
109
	    "r", options.user,
110
	    "f", family,
103
	    (char *)NULL);
111
	    (char *)NULL);
104
	free(tmp);
112
	free(tmp);
105
	return ret;
113
	return ret;

Return to bug 3199