loading...

How to create SSH Key on Mac Terminal

konabuta profile image konabuta ・1 min read

Just for memorandum.

ssh-keygen -t rsa

and you get

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/<username>/.ssh/id_rsa): 
/Users/<username>/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/<username>/.ssh/id_rsa.
Your public key has been saved in /Users/<username>/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:O9gHqGxZOua51PfVNL6GZN/FixT6nOuXptCTOzhkqd0 <hostname>
The key's randomart image is:
+---[RSA 2048]----+
|                 |
|                 |
|                 |
|       .     .   |
|      o S   o +. |
|   . * o o =+=..o|
|    X o = *+B*=.+|
|   = o . = =oE=*.|
|    +.    . o*B  |
+----[SHA256]-----+

There are files generated under ~/.ssh folder.

 id_rsa
 id_rsa.pub

id_rsa : private key
id_rsa.pub : public key

Posted on Mar 29 by:

konabuta profile

konabuta

@konabuta

Cloud Solution Architect Data & AI at Microsoft Japan.

Discussion

markdown guide