Thursday, 10 September 2020

How to generate SSH key pair on Ubuntu

ssh-keygen -t rsa -b 4096 -C ""

-t Specifies the type of key to create.  The possible values are “dsa”, “ecdsa”, “ed25519”, or “rsa”.

-C comment Provides a new comment. This can be any string you want to help identify the key. As this keypair is unique and represents an identity of the (e.g. repository) user, I tend to use email format: user@domain

-b bits Specifies the number of bits in the key to create. For RSA keys, the minimum size is 1024 bits and the default is 3072 bits. Generally, 3072 bits is considered sufficient


$ ssh-keygen -t rsa -b 4096 -C ""
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bojan/.ssh/id_rsa): ./key-pair--ec2--my-app
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./key-pair--ec2--my-app
Your public key has been saved in ./
The key fingerprint is:
The key's randomart image is:
+---[RSA 4096]----+
|   o=+ .o..      |
|      o  ...     |
|     .    o=+ .  |
|      .  .o=o*   |
|     .  S.oo+ .  |
|      .   =+.+  .|
|       . =o+++o..|
|        =.+o= o*.|
|       oE..o....O|

$ ls -la
-rw------- 1 bojan bojan 3434 May 27 17:27 key-pair--ec2--my-app
-rw-r--r-- 1 bojan bojan  749 May 27 17:27


To copy the contents of the file to clipboard:

xclip -sel clip < ~/.ssh/

Private key with default name (~/.ssh/id_rsa) should automatically be added to the SSH authentication agent. To check this we can start the ssh-agent and 
$ eval "$(ssh-agent -s)"
Agent pid 76155

$ ssh-add -l -E sha256
256 SHA256:DUXxZAyhbh68kJwex8rzHXQM2cKzSWadNqzW1KnPR3A (ED25519)

If we have only key that does not have the default name, it might not have been added to SSH agent in which case the output would be:

$ ssh-add -l -E sha256
The agent has no identities.

To add the key:

$ ssh-add path/to/mykey
Enter passphrase for path/to/mykey: 
Identity added: path/to/mykey (


tike mik said...

There are many ways to market your product using a large number of online with Google AdWords or Yahoo's Overture advertising network, eBay, members network, cost per click marketing. In addition, there are many second tier cost of sales and earnings per share network. Leadgeneration

micheal pan said...

BE SMART AND BECOME RICH IN LESS THAN 3DAYS....It all depends on how fast 
you can be to get the new PROGRAMMED blank ATM card that is capable of
hacking into any ATM machine,anywhere in the world. I got to know about 
this BLANK ATM CARD when I was searching for job online about a month 
ago..It has really changed my life for good and now I can say I'm rich and 
I can never be poor again. The least money I get in a day with it is about 
$50,000.(fifty thousand USD) Every now and then I keeping pumping money 
into my account. Though is illegal,there is no risk of being caught 
,because it has been programmed in such a way that it is not traceable,it 
also has a technique that makes it impossible for the CCTVs to detect 
you..For details on how to get yours today, email the hackers on : ( ). Tell your 
loved once too, and start to live large. That's the simple testimony of how 
my life changed for good...Love you all ...the email address again is ;

Huongkvb said...

Đặt vé máy bay tại Aivivu, tham khảo

ve may bay di my gia re

giá vé máy bay từ mỹ về việt nam tháng 12

vé máy bay từ canada về việt nam

vé máy bay từ tokyo vé hà nội

dat ve may bay tu han quoc ve viet nam

Vé máy bay từ Đài Loan về Việt Nam

Chuyến bay cho chuyên gia nước ngoài