Search our database

How to generate your SSH public key

1st step to generate the public key :-

Step 1 : SSH to the server under root privilege :-

# cd ~/.ssh
# ls

After done, generate the key using command below :

# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/schacon/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/schacon/.ssh/id_rsa.
Your public key has been saved in /Users/schacon/.ssh/
The key fingerprint is:
43:c5:5b:5f:b1:f1:50:43:ad:20:a6:92:6a:1f:9a:3a schacon@agadorlaptop.local

It will show the request as above, just press ENTER until finish.

All they have to do is copy the contents of the .pub file and e-mail it. The public keys look something like this :-

# cat ~/.ssh/
NrRFi9wrf+M7Q== schacon@agadorlaptop.local

Now you have done generate the public key. Copy the public key and send to user that request it.

Tags: , ,