- Linux Commands Cheat Sheet popular
- Windows Commands Cheat Sheet popular
- How to use proxy in Linux popular
- Shell Script Cheat Sheet popular
- vi / vim Cheat Sheet popular
|RSA1 (ssh version1)||ssh-keygen -t rsa1 -C "comment"||Private Key : ~/.ssh/identity |
Publick Key : ~/.ssh/identity.pub
|RSA (ssh version2)||ssh-keygen -t rsa -C "comment"||Private Key : ~/.ssh/id_rsa |
Publick Key : ~/.ssh/id_rsa.pub
|DSA (ssh version2)||ssh-keygen -t dsa -C "comment"||Private Key : ~/.ssh/id_dsa |
Publick Key : ~/.ssh/id_dsa.pub
|AWS does not support|
$ ssh-keygen -t rsa -C "test" Generating public/private rsa key pair. Enter file in which to save the key (/home/infra/.ssh/id_rsa): id_rsa_test Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in id_rsa_test. Your public key has been saved in id_rsa_test.pub. The key fingerprint is: 83:ef:2d:29:2b:54:b8:9a:e0:74:04:e5:b0:xx:xx:xx test $ $ ls id_rsa_test id_rsa_test.pub $
-t type Specifies the type of key to create. The possible values are “rsa1” for protocol version 1 and “dsa”, “ecdsa”, “ed25519”, or “rsa” for protocol version 2.
$ cd # change home directory $ chmod 700 .ssh $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ chmod 600 ~/.ssh/authorized_keys $ rm ~/.ssh/id_rsa.pub
ssh-keygen -p -P OLD_PASSPHRASE -N NEW_PASSPHRASE -f PRIVATE_KEY
ssh-keygen -p -P OLD_PASSPHRASE -N "" -f PRIVATE_KEY
-p Requests changing the passphrase of a private key file instead of creating a new private key.
ssh-keygen -i -f id_rsa_putty.pub > id_rsa.pub -i This option will read an unencrypted private (or public) key file in the format specified by the -m option and print an OpenSSH compatible private (or public) key to stdout. -f filename Specifies the filename of the key file.
ssh-keygen -y -f ~/.ssh/id_rsa > id_rsa.pub -y This option will read a private OpenSSH format file and print an OpenSSH public key to stdout. -f filename Specifies the filename of the key file.