SSH - Config connection aliases.
Open up the SSH config for the current user profile with:
If SSH config does not exist, create the directory and file with:
sudo nano ~/.ssh/config
Next enter in the server connection information in the following format:
Host <host_config_name> HostName <host_address> #ip or url User <ssh_username> Port <number> PreferredAuthentications publickey #Lets it know we want to use RSA authetication # Custom RSA file path only IdentityFile ~/.ssh/<rsa_key_to_use> #If not default RSA file IdentitiesOnly yes #Stops SSH from trying default RSA if custom is set
Host name is what will be written to used these SSH setting when calling the SSH command.
To connect to the server via SSH the
<host_config_name> can now be used by shorthand. Connection can be established like so: