Skip to content

Instantly share code, notes, and snippets.

@neilkuan
Created May 3, 2021 08:19
Show Gist options
  • Select an option

  • Save neilkuan/ede7d996b8949f0e555c195c7e863069 to your computer and use it in GitHub Desktop.

Select an option

Save neilkuan/ede7d996b8949f0e555c195c7e863069 to your computer and use it in GitHub Desktop.
ssh-keygen.md

The note for ssh-keygen

OS: Centos7 and MacOS(amd)

# example
# ssh-keygen -t rsa -b 4096 -f $HOME/.ssh/[filename] -P "" -C [email]
# -t type [dsa | ecdsa | ed25519 | rsa]
# -b bits
# -f [output_keyfile]
# -P [passphrase]
# -C [comment]

$ ssh-keygen -t rsa -b 4096 -f $HOME/.ssh/jay -P "" -C [email protected]

--- output
Generating public/private rsa key pair.
Your identification has been saved in /Users/exampleuser/.ssh/exampleuser.
Your public key has been saved in /Users/exampleuser/.ssh/exampleuser.pub.
The key fingerprint is:
SHA256:uhLtxY86JctTBOa/sodfzLaY3wUKpbCO2ExpWGUWqXQ [email protected]
The key's randomart image is:
+---[RSA 4096]----+
|      =o         |
|    .+E          |
|   ..=..  .      |
|   o...o.o       |
|  . +..+S   .    |
|   *.oo.*+ . .   |
|  . ++oB +*   .  |
|    . O.+=.o .   |
|     .+O+.o .    |
+----[SHA256]-----+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment