I just added my no-ip domain to /private/etc/hosts under a shorter alias:
I tried the following on the shell:
but it still says:
ssh: Could not resolve hostname
What up with that?
/etc/hosts cannot be used (by itself) to produce hostname "aliases".
The hosts file produces the internal equivalent of A and PTR records from the DNS, i.e. mapping of hostname to IP address and vice-versa.
It cannot be used to produce the same effect as a CNAME record.
You can make
ssh alias equivalent to
ssh host.no-ip.biz or
ssh email@example.com by adding lines like this to
Host alias HostName host.no-ip.biz # User username