Xymon Mailing List Archive search

test ssh domain name instead of IP

list Mark Felder
Tue, 16 Sep 2014 16:44:11 -0500
Message-Id: <user-0aa59ffea87e@xymon.invalid>


On Tue, Sep 16, 2014, at 14:54, Kris Springer wrote:
Anyone know how to test ssh using a domain name instead of an IP? I'm using the rclient and monitoring NAS devices that are remote and behind port forwarded DHCP home routers that have DDNS names so I have 0.0.0.0 for the host IP's in the hosts.cfg file.  I just want to test ssh to the DDNS name, not the IP.  The NAS host line in my hosts.cfg is not using a FQDN as the hostname because that gets checked as a separate host.  Here's a sample of what I have in my hosts.cfg file.

0.0.0.0         myrouter.myddns.net     # trace
0.0.0.0         NAS                 # noconn ssh "RCLIENT:cmd(ssh -T -i /home/xymon/.ssh/xymon-rclient user-7bd5c34c7476@xymon.invalid),ostype(linux)"
If the server can resolve the hostname it will use that for the tests.
If you put NAS in your /etc/hosts file I believe it should work.