[Bug 1916] Wish: support multiple alternative hostnames for a given host alias (useful with NAT)

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Jun 28 08:38:44 EST 2011


https://bugzilla.mindrot.org/show_bug.cgi?id=1916

--- Comment #2 from Richard Neill <openssh at richardneill.org> 2011-06-28 08:38:44 EST ---
> you can do this by butting multiple addresses for the host in question
> in /etc/hosts or in the DNS

Sadly this only works if one has sufficient control. After all, if one
can control DNS satisfactorily, the issue doesn't arise. But from the
SSH user's perspective, he cannot necessarily alter the DNS.

However, in the worst case, all we have are two (or more) host-names,
maybe or not fully-qualified, and where, depending on where the laptop
is (and what DHCP/DNS server is answering), either, both or neither of
these is the right machine. 

I can achieve what I want from a bash alias quite easily, but this
isn't helpful when stacking things like nautilus bookmarks on top of
ssh. Eg:

alias ssh_mydesktop='{ fping -q internal_hostname && ssh
internal_hostname;} || { fping -q external_hosgtname && ssh
external_hostname ;} || { echo Sory, unreachable either way ;} '

(this approach is also brittle, if I am outside my own firewall, and
"internal_hostname" coincides with an entry that happens to be valid in
the external DNS server.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list