Have a Question?

If you have any question you can ask below or enter what you are looking for!

Generating SSH Key in Linux

It is possible to generate SSH key pair in Linux with ssh-keygen command.

A file will be requested wherein the key should be saved along with the passphrase (password) for the key.

whb@host: ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/jolt/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_dsa.
Your public key has been saved in id_dsa.pub.
The key fingerprint is:
11:9e:ef:f2:14:a9:b9:c8:32:9c:b1:c3:c1:f5:d5:61 jolt@host

This will create a private key saved in /home/jolt/.ssh/id_dsa and a public key saved in /home/jolt/.ssh/id_dsa.pub

The passphrase is used whenever you connect using SSH.

[su_note note_color=”#ffa6bd”]Never reveal your private SSH key. It is acceptable to ask for a public SSH key, which is absolutely safe to divulge.[/su_note]

Leave a Reply

You must be logged in to post a comment.