If you have a lot of hosts that you maintain, keeping their IP adresses in mind or on the record if the IP addess somewhere else, and pasting them every time you wish to log in makes life hard. Even with one host. It’s much easyer to give it a name, like “myserver”, a port if you drive your sshd on an alternative port, and a default user to log in and then just type
for an instant ssh to that host, without password (if you done the Part I of the article), or any other questions. This is called an ssh alias.
We need to create / edit the ~/.ssh/config file and write our aliases in there, for examnple:
HostName <IP or URL to the remote server>
User <desired login user>
Port <the port that the remote sshd listens to, if not standard 22>
And done. If you have more than 1 host, just enter them below…
Then just do ssh myserver and you’ll be instantly logged into the remote host that is defined under it.