Home > General > Adding ssh-keygen manually

Adding ssh-keygen manually


</pre>
test@testenv:/# ssh-keygen -t rsa -b 4096 -C "karun.chennuri@test.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
90:b9:6d:84:9e:bc:71:80:19:12:ec:e4:5d:51:11:dc karun.chennuri@test.com
The key's randomart image is:
+--[ RSA 4096]----+
| .o.. .+++ |
| o. +.+. E |
| + .o.* . |
| o .o B |
| * S |
| = |
| . |
| |
| |
+-----------------+

test@test-env:~$ ssh-add
Could not open a connection to your authentication agent.

# If you see above error then
$ eval 'ssh-agent -s'
SSH_AUTH_SOCK=/tmp/ssh-pxa9H7geUdOJ/agent.31326; export SSH_AUTH_SOCK;
SSH_AGENT_PID=31327; export SSH_AGENT_PID;
echo Agent pid 31327;

$ SSH_AUTH_SOCK=/tmp/ssh-pxa9H7geUdOJ/agent.31326; export SSH_AUTH_SOCK;
$ SSH_AGENT_PID=31327; export SSH_AGENT_PID;

# Then again issue below command ssh-add this time it should work...

test@testenv:/# ssh-add -l
The agent has no identities.
test@testenv:/# ssh-add
Enter passphrase for /root/.ssh/id_rsa:
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
test@testenv:/# ssh-add -l
4096 90:b9:6d:84:9e:bc:71:80:19:12:ec:e4:5d:51:11:dc /root/.ssh/id_rsa (RSA)

Advertisements
Categories: General
  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: