How to simplify access to SSH with .ssh/config

If you are frequently access ssh where you need to check the server IP Address to SSH, this is the way for you to simplify the process. The strategy is to put a name to the ssh address, and you will only need to call ssh + name to access it.

On your ~/.ssh/config file, set the following:

Host yoursshname
Hostname yourserveripaddress
User ubuntu
IdentityFile ~/.ssh/id_ed25519
  1. Be sure to change yoursshname to any name that you like.
  2. Be sure to change yourserveripaddress with your server IP Address or server hostname.
  3. Be sure to change ubuntu to your server username.
  4. Be sure to set IdentityFile path correctly.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *