Create the config file in your .ssh directory if it doesn’t already exist.
touch /home/pat/.ssh/config
Open the file and add your configuration:
Host xmp
HostName example.com
User username
Port 2222
Where Host is the name of the shortcut. You can also add other options like
PubkeyAuthentication yes
PasswordAuthentication no
ServerAliveInterval 25
ServerAliveCountMax 150
or another Host to your configuration. Take a look at the ssh_config manpage for more options.
You can now use your shortcut with
ssh xmp