How to give aliases to SSH user and IP addresses
As you ssh into multiple machines or servers, it can get hard to remember the IP address of each of the server you have.
For example, if your application has different servers for app-server, cache, database, etc… there could be a different IP for each one of them.
> ssh email@example.com> ssh firstname.lastname@example.org
To reduce this cognitive overload, you can create a ssh config that removes the need to remember the usernames and IP addresses of the servers.
To get started, create a ~/.ssh/config file if it doesn’t exist.
Now, open the config file and add the following configuration
Host app-server HostName <IP_address_of_app_server> User <user_to_login>Host database HostName <IP_address_of_database> User <user_to_login>
Once you add the above config, you can ssh into the servers with this command
$ ssh app-server
Hope this reduces some cognitive load for you.