Run the following:
ssh-keygen -t rsa -b 2048
then
touch ~/.ssh/config
Now edit config to look something like:
# host-specific options
Host enigma
HostName mydomain.com
Port 2547
ServerAliveInterval 120
User YOURUSERNAME
TCPKeepAlive Yes
Now connect
ssh-copy-id [email protected]
You should be able to connect to the Server using the Hostname in the config file.
i.e. ssh enigma
I have about 20 connections in my Config file, and all short referenced so i dont have to type the domain and password each time.
The secuirty flaw to this, is that all SSH connections unless you start creating different Hostfiles. Are in one file.
Protected by one password.
So if you store 20 Connections to the one file, Then if that one password is compromised then so are all 20 connections.
I use a couple of hosts file, Personal, Work and Misc
its not too much of a issue if a password is leaked then