Generating SSH Keys
$ ssh-keygen -b 4096
-b number of bits.
~/.ssh/id_rsa: The private key.
~/.ssh/id_rsa.pub: The associated public key.
Copying your Public SSH Key to a Server:
Ensure that the ~/.ssh directory exists, and then append:
$ cat ~/.ssh/id_rsa.pub | ssh username@host "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
To Upload the Public key to the Server:
ssh-copy-id -i ~/.ssh/key user@host