Knowledge Base

  1. Casa
  2. How To
  3. SSH private and public keys
Creato il
Modificato il

Articolo 2700

SSH private and public keys

Introduction

Private Key

When generating a new private key in the SSH dialog, a OpenSSL compatible private key is generated.
Default private key file name: Identity
Format: PKCS8, PEM

Public Key

When exporting the public key in the SSH dialog, the public key format can be selected in the Save As... dialog box.
Default public key file name: Identity.pub
Public key formats:
SSH Public Key Format (RFC 4716). This is the default public key format OpenSSL works with.
OpenSSH public key format

Examples

The following provides examples for operations on a RSA private/public key pair using the OpenSSL binary.

OpenSSL private key

Show details of private key:
openssl rsa -in Identity -text

Export public key:
openssl rsa -in Identity -pubout > Identity.pub

Fingerprint (of public key, given a private key):
openssl rsa -in Identity -pubout -outform DER | openssl sha1 -c
openssl rsa -in Identity -pubout -outform DER | openssl md5 -c

OpenSSL (RFC 4716) public key

Show details of public key:
openssl rsa -pubin -in Identity.pub -text

Fingerprint:
openssl rsa -pubin -in Identity.pub -outform DER | openssl md5 -c
openssl rsa -pubin -in Identity.pub -outform DER | openssl sha1 -c

Convert to OpenSSH public key:
Using ssh-keygen
ssh-keygen -f Identity.pub -i

Parole Chiave
ssh openssh openssl keygen

Articoli Correlati


What do you think about this topic? Send feedback!