Check if you already have a key generated
cd ~/.ssh
ls
If you see files
id_ed25519 id_ed25519.pub
then GOTO step 3 else continue to step 2.
If no ssh keys were found, generate one using
ssh-keygen -t ed25519
Press Enter few times to accept default location and no key password
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/arti/.ssh/id_ed25519):
Enter passphrase for "/home/arti/.ssh/id_ed25519" (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/arti/.ssh/id_ed25519
Your public key has been saved in /home/arti/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:SWRd4j9QhGwXwGIb0K2SaXMvRp35Xocm0pSNCAmy1/A arti@hiir
The key's randomart image is:
+--[ED25519 256]--+
| . ++o*o==. |
| o *B.Bo. |
| . .+EOo= + |
| .*.=.=o+ . |
| . =S. +o . |
| o o +.+ .|
| . . o + . |
| . |
| |
+----[SHA256]-----+
NB: Key fingerprint shown in the output is useless for login
Copy public public part of the key to the clipboard and paste it where requested.
cat ~/.ssh/id_ed25519.pub
Example Output:
ssh-ed25519 AAAAC3NzaC1lZDI1NTXXAAAAIGMwe4ArUHevU2+3IFcbfaSIDDvuJQOYYlkvN/tncb2d arti@hiir