Kiến thức cơ bản

Trang chủ » How To » SSH private and public keys

Ngày tạo
Ngày sửa

In trang này

Mục tin 2700

SSH private and public keys


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:
Public key formats:
SSH Public Key Format (RFC 4716). This is the default public key format OpenSSL works with.
OpenSSH public key format


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 >

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 -text

openssl rsa -pubin -in -outform DER | openssl md5 -c
openssl rsa -pubin -in -outform DER | openssl sha1 -c

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

Các từ khóa
openssh openssl keygen

Các bài có liên quan

What do you think about this topic? Send feedback!