I’ve recently switched my hosting from single self-managed dedicated server at 1and1 to a managed virtual private data center on “the cloud” with ENKI consulting. The benefits of the grid computing technology they are using are numerous, including improved security, automatic redundant failover, and great mangement and monitoring tools.
As part the improved security, each component of the system (webserver, database) runs in its own virtual machine, and only has the bare minimum access to files and other services that it needs. When setting these up, I have to ssh to each component individually. Access is provided to the seperate components by having a different ssh port on one externally available IP address.
Typing in “ssh -p 7543 firstname.lastname@example.org″ with varying port numbers, usernames, and IP addresses can be a pain. Today I found out that you can specify aliases in your ssh configuration that set up connection options, hostnames, and IP addresses.
Simply edit ~/.ssh/config and put sections like:
Each time ssh finds “Host” it treats the settings that follow as specific to that host, and “HostName” tells it the “real” host to connect to. These aliases are a great shortcut and I was so pleased to discover them I couldn’t wait to share them.
Hope you make good use of this one …