Home > Unix/Linux > How to Generate SSH key in Linux

How to Generate SSH key in Linux

Some or the other times, there is a need to have a SSH key generated to allow traffic from/to different server. Today I created a SSH key on LINUX machine.

You need to run the command “ssh-keygen -t dsa” on the command prompt.

applerp.R12VIS.adc-al-lnx45>ssh-keygen -t dsa
Generating public/private dsa key pair

Enter file in which to save the key (/home/applerp/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applerp/.ssh/id_dsa.
Your public key has been saved in /home/applerp/.ssh/id_dsa.pub.
The key fingerprint is:
48:80:4f:8f:0a:7b:27:e4:82:a0:33:ab:89:48:67:ed <a href="mailto:applerp@adc-al-lnx45.am.corp.airliquide.com">applerp@adc-al-lnx45.am.corp.airliquide.com</a>
<em>applerp.R12VIS.adc-al-lnx45></em>

If you need to create 4k RSA SSH key, issue the below command
ssh-keygen -t rsa -b 4096

And once the key is generated, if you would like to view the fingerprint, issue below command
ssh-keygen -lf <complete_path_of_public_key>/id_rsa.pub
-Anand

Advertisements
Categories: Unix/Linux
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: