[geeks] X11 forwarding over ssh: hostname resolution

Charles Shannon Hendrix shannon at widomaker.com
Mon Jul 17 10:09:32 CDT 2006


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

It is supposed to match <anything>.goid.lan, according to the man page,
but it doesn't.  Bug, feature, me reading it wrong?


-- 
shannon "AT" widomaker.com -- ["An Irishman is never drunk as long as he
can hold onto one blade of grass and not fall off the face of the earth."]



More information about the geeks mailing list