[user@l01 ~] $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lv70XXX/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/lv70XXX/user/.ssh/id_rsa.
Your public key has been saved in /home/lv70XXX/user/.ssh/id_rsa.pub.
The key fingerprint is:
85:d3:de:15:58:d0:78:8d:03:a6:ca:de:6e:58:c3:21 testuser@l01
The key's randomart image is:
+--[ RSA 2048]----+
| +Boo |
| o oo =..|
| o + ... |
| .E=.. . |
| So... |
| . .+ |
| .o.. |
| ... |
| .. |
+-----------------+
[user@l01 ~] $ ls -al .ssh
total 16
drwxr-xr-x 2 user sysadmin 4096 Sep 11 12:07 .
drwxr-x--- 60 user sysadmin 4096 Sep 11 12:07 ..
-rw------- 1 user sysadmin 1675 Sep 11 12:07 id_rsa
-rw-r--r-- 1 user sysadmin 394 Sep 11 12:07 id_rsa.pub
[user@l01 ~] $ cd .ssh
[user@l01 ~/.ssh] $ cat id_rsa.pub > authorized_keys
[user@l01 ~/.ssh] $ chmod 600 authorized_keys