Steve Bennett asked:
I set up hostname aliases in
.ssh/config, which works great:
Host my-web HostName 515.346.96.21
So I can do this:
But in a browser, I still need to type in “
http://515.346.96.21“. It would be great to be able to do “
Short of using a Dynamic DNS, or writing a script to synchronise changes with
/etc/hosts, is there a way to use the aliases in SSH more widely? I create and destroy VMs with different IPs pretty often, so am constantly updating
You can just forget about setting aliases anywhere, if you use something like Avahi. This lets your workstation and servers (even virtual ones, if you bridged the virtual network) find each other and address each other by name.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.