DEV Community

Keita Onabuta
Keita Onabuta

Posted on

3 1

How to create SSH Key on Mac Terminal

Just for memorandum.

ssh-keygen -t rsa
Enter fullscreen mode Exit fullscreen mode

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]-----+
Enter fullscreen mode Exit fullscreen mode

There are files generated under ~/.ssh folder.

 id_rsa
 id_rsa.pub
Enter fullscreen mode Exit fullscreen mode

id_rsa : private key
id_rsa.pub : public key

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay