add ssh key to ubuntu server

By | August 30, 2021

ssh-keygen

Generating public/private rsa key pair.
Enter file in which to save the key (/home/system/.ssh/id_rsa): /home/system/.ssh/id_rsa_box_contoh
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/system/.ssh/id_rsa_box_contoh.
Your public key has been saved in /home/system/.ssh/id_rsa_box_contoh.pub.
The key fingerprint is:
SHA256:aaaabbbbcccdddd system@telo
The key's randomart image is:
+---[RSA 2048]----+
|                 |
|         telo    |
|      telo       |
|     telo        |
|    telo         |
+----[SHA256]-----+

scp /home/system/.ssh/id_rsa_box_contoh user@servertujuan:/home/system

di server tujuan :
cat /home/system/.ssh/id_rsa_box_contoh > /home/system/.ssh/authorized_keys