Create
an SSH key-pair
Create
an SSH key-pair
[local: ~] $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/USERNAME/.ssh/id_rsa): /home/USERNAME/.ssh/id_rsa.MYSERVER
Enter passphrase (empty for no passphrase): XXXXXXXX
Enter same passphrase again: XXXXXXXX
Your identification has been saved in /home/USERNAME/id_rsa.MYSERVER. # your private key
Your public key has been saved in /home/USERNAME/id_rsa.MYSERVER.pub. # your public key
The key fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX USERNAME@localhost
The key's randomart image is:
+--[ RSA 2048]----+
| .. |
| . . |
| + . |
| + + |
| .So +. |
| .+.+.o++.+ |
| * +.. ... |
| o = . |
|E. . |
+-----------------+
[local: ~] $ cd ~/.ssh
[local: ~/.ssh] $ ls
id_rsa.MYSERVER
id_rsa.MYSERVER.pub
[local: ~/.ssh] $ cat id_rsa.MYSERVER.pub
ssh-rsa AAAAB3NzaC1yc2E...bwcUfB+n+cNlymg5j/UpEBt USERNAME@localhost
[local: ~/.ssh] $ (Now, send id_rsa.MYSERVER.pub to your remote server.)