[geeks] X11 forwarding over ssh: hostname resolution

Michael Parson mparson at bl.org
Mon Jul 17 10:19:11 CDT 2006


On Mon, Jul 17, 2006 at 11:09:32AM -0400, Charles Shannon Hendrix wrote:
> I use ssh tunneling to run X clients remotely on my local display.
> 
> I've found a curious "issue" in that the ssh client takes hostnames
> very literally.
> 
> If I put this in my ~/.ssh/config file:
> 
> 	host caesar.goid.lan
> 		ForwardX11 yes
> 	
> ...X connections to this host do *NOT* get forwarded.
> 
> I have to do this instead:
> 
> 	host caesar
> 		ForwardX11 yes
> 
> In the man page it says that the host name given on the command line is
> not converted to a canonicalized host name before matching.  Does that
> mean the host name matching is literal, and not based on DNS?
> 
> Is there any way to get around this?  Some programs use <hostname> while
> others use <hostname>.<domain> when doind ssh connections, and I really
> hate to put two entries in for every machine.  Not as big a deal for X
> forwarding, but it affects other settings as well.
> 
> The man page says you can use * and ? as wildcards, but this (which I
> really don't want, or rather avoid) doesn't work:
> 
> 	host *.goid.lan
> 		ForwardX11 yes

I use something more like:

host caesar.goid.lan caesar
	ForwardX11 yes
	...

I don't remember if I found that in the man page or tried it and it
worked, but it seems to work for me.

-- 
Michael Parson
mparson at bl.org



More information about the geeks mailing list