puttygen生成公私钥

Puttygen is used to generate ssh public and private keys for putty. We can use a different type of encryption algorithm bit sizes and ssh versions. In this tutorial, we will look at useful examples of puttygen.

Puttygen用于生成SSH的SSH公钥和私钥。 我们可以使用其他类型的加密算法,位大小和ssh版本。 在本教程中,我们将看一些有用的Puttygen示例。

将Puttygen安装到Linux (Install Puttygen To Linux)

puttygen is provided with putty packages most of the Linux distributions like Ubuntu, Debian, Fedora, CentOS, RedHat.

puttygen提供了大多数Linux发行版中的putty软件包,例如Ubuntu,Debian,Fedora,CentOS,RedHat。

Ubuntu,Debian (Ubuntu, Debian)

puttygen tool is provided with the putty package in Debian, Mint, Ubuntu, Kali.

在Debian,Mint,Ubuntu,Kali的putty软件包中提供了puttygen工具。

$ sudo apt install putty

Install Puttygen To Linux
将Puttygen安装到Linux

Fedora,CentOS,RedHat (Fedora, CentOS, RedHat)

puttygen tool is provided with the putty package in Fedora, CentOS, RedHat.

Fedora,CentOS和RedHat中的putty软件包随附了puttygen工具。

$ sudo yum install putty

视窗 (Windows)

Windows binaries are provided with the following URL.

Windows二进制文件带有以下URL。

32位 (32 bit)

https://the.earth.li/~sgtatham/putty/latest/w32/puttygen.exe

https://the.earth.li/~sgtatham/putty/latest/w32/puttygen.exe

64位 (64 bit)

https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe

https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe

puttygen命令语法 (puttygen Command Syntax)

The syntax of puttygen is like below. puttygen is a simple command where there are two parameters named KEYFILE, OPTIONS.

puttygen的语法如下。 puttygen是一个简单的命令,其中有两个名为KEYFILE,OPTIONS的参数。

puttygen KEYFILE OPTINONS
  • KEYFILE is the file we read

    KEYFILE是我们读取的文件

  • OPTIONS are used to specify size, output key file, etc.

    OPTIONS用于指定大小,输出密钥文件等。

从puttygen GUI创建密钥 (Create Key From puttygen GUI)

puttygen tool is provided with a GUI in Windows operating systems. We can download this GUI tool which is explained in the Download For Windows section. Then from the tool, we will be provided a simple screen where we can set different parameters about the cryptographic key creation.

Windows操作系统中的GUI附带了puttygen工具。 我们可以下载此GUI工具,这在Windows的下载部分中进行了说明。 然后,通过该工具,我们将提供一个简单的屏幕,其中我们可以设置有关密码密钥创建的不同参数。

Create Key From puttygen GUI
从puttygen GUI创建密钥

We can see that there is 3 main part of the window.

我们可以看到窗口有3个主要部分。

  • Key part provides the key in ASCII format.

    Key部分以ASCII格式提供密钥。

  • Actions part will provide buttons for Key generation, Load Existing Key, Save Public Key, Save Private Key.

    Actions部分将提供用于生成密钥,加载现有密钥,保存公共密钥,保存私有密钥的按钮。

  • Parameters part provides the key type selection like RSA, DSA, ECDSA, ED25519, SSH-1 (RSA), and the size of the key as bits where default size is 2048 which is accepted as secure.

    Parameters部分提供了密钥类型选择,例如RSADSAECDSAED25519SSH-1 (RSA) ,以及密钥的大小(以位为单位),默认大小为2048,可以接受此保护。

.u7c15a9730438ab7a9e17a236d57b841f , .u7c15a9730438ab7a9e17a236d57b841f .postImageUrl , .u7c15a9730438ab7a9e17a236d57b841f .centered-text-area { min-height: 80px; position: relative; } .u7c15a9730438ab7a9e17a236d57b841f , .u7c15a9730438ab7a9e17a236d57b841f:hover , .u7c15a9730438ab7a9e17a236d57b841f:visited , .u7c15a9730438ab7a9e17a236d57b841f:active { border:0!important; } .u7c15a9730438ab7a9e17a236d57b841f .clearfix:after { content: ""; display: table; clear: both; } .u7c15a9730438ab7a9e17a236d57b841f { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u7c15a9730438ab7a9e17a236d57b841f:active , .u7c15a9730438ab7a9e17a236d57b841f:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u7c15a9730438ab7a9e17a236d57b841f .centered-text-area { width: 100%; position: relative; } .u7c15a9730438ab7a9e17a236d57b841f .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u7c15a9730438ab7a9e17a236d57b841f .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u7c15a9730438ab7a9e17a236d57b841f .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u7c15a9730438ab7a9e17a236d57b841f:hover .ctaButton { background-color: #E67E22!important; } .u7c15a9730438ab7a9e17a236d57b841f .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u7c15a9730438ab7a9e17a236d57b841f .u7c15a9730438ab7a9e17a236d57b841f-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u7c15a9730438ab7a9e17a236d57b841f:after { content: ""; display: block; clear: both; }

LEARN MORE  How To Install and Use Linux Minicom Command Tutorial with Examples?

.u7c15a9730438ab7a9e17a236d57b841f , .u7c15a9730438ab7a9e17a236d57b841f .postImageUrl , .u7c15a9730438ab7a9e17a236d57b841f .centered-text-area { min-height: 80px; position: relative; } .u7c15a9730438ab7a9e17a236d57b841f , .u7c15a9730438ab7a9e17a236d57b841f:hover , .u7c15a9730438ab7a9e17a236d57b841f:visited , .u7c15a9730438ab7a9e17a236d57b841f:active { border:0!important; } .u7c15a9730438ab7a9e17a236d57b841f .clearfix:after { content: ""; display: table; clear: both; } .u7c15a9730438ab7a9e17a236d57b841f { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #ECF0F1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.17); } .u7c15a9730438ab7a9e17a236d57b841f:active , .u7c15a9730438ab7a9e17a236d57b841f:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #D35400; } .u7c15a9730438ab7a9e17a236d57b841f .centered-text-area { width: 100%; position: relative; } .u7c15a9730438ab7a9e17a236d57b841f .ctaText { border-bottom: 0 solid #fff; color: #3498DB; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u7c15a9730438ab7a9e17a236d57b841f .postTitle { color: #27AE60; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u7c15a9730438ab7a9e17a236d57b841f .ctaButton { background-color: #e6e6e6!important; color: #3498DB; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://www.poftut.com/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u7c15a9730438ab7a9e17a236d57b841f:hover .ctaButton { background-color: #E67E22!important; } .u7c15a9730438ab7a9e17a236d57b841f .centered-text { display: table; height: 80px; padding-left: 18px; top: 0; } .u7c15a9730438ab7a9e17a236d57b841f .u7c15a9730438ab7a9e17a236d57b841f-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u7c15a9730438ab7a9e17a236d57b841f:after { content: ""; display: block; clear: both; }

了解更多信息如何通过示例安装和使用Linux Minicom命令教程?

使用Puttygen GUI创建2048个RSA密钥 (Create 2048  RSA Key with Puttygen GUI)

We can generate an RSA key which is 2048 bit by using the following configuration for the puttygen. We will click on the Generate button with the default parameters. As cryptography and security are based randomness puttygen need real random data that can be provided with the random mouse hovering over the screen.

我们可以通过对puttygen使用以下配置来生成一个2048位的RSA密钥。 我们将单击带有默认参数的Generate按钮。 由于密码学和安全性是基于随机性的,因此腻子需要真正的随机数据,这些数据可以通过鼠标悬停在屏幕上来提供。

Create 2048  RSA Key with Puttygen GUI
使用Puttygen GUI创建2048个RSA密钥

At the end of the key generation, the following screen will appear where information about the generated key will be presented.

在密钥生成结束时,将出现以下屏幕,其中将显示有关所生成密钥的信息。

Create 2048  RSA Key with Puttygen GUI
使用Puttygen GUI创建2048个RSA密钥
  • Key fingerprint is a value that uniquely identifies the created key.

    Key fingerprint是唯一标识创建的密钥的值。

  • Key comment is a short description of the created key.

    Key comment是对创建的键的简短描述。

  • Key passphrase is a passphrase or password to encrypt the created key.

    Key passphrase是用于加密创建的密钥的密码短语或密码。

We can also create different types and sizes of the keys by changing parameters like below.

我们还可以通过更改如下所示的参数来创建不同类型和大小的键。

  • Create 2048  DSA Key with Puttygen GUI使用Puttygen GUI创建2048 DSA密钥
  • Create 4096 RSA Key with Puttygen GUI使用Puttygen GUI创建4096个RSA密钥
  • Create 4096 DSA Key with Puttygen GUI使用Puttygen GUI创建4096个DSA密钥

将现有密钥加载到Puttygen GUI(Load Existing Key To Puttygen GUI)

We can load existing puttygen generated key or key pairs easily. We will use the Load button where we can specify the key file.

我们可以轻松加载现有的puttygen生成的密钥或密钥对。 我们将使用“ Load按钮来指定密钥文件。

Load Existing Key To Puttygen GUI
将现有密钥加载到Puttygen GUI

将生成的公钥保存到文件 (Save Generated Public Key To A File)

After creating a Public and Private Key Pair we can save these created keys. We can save generated Public Key into a file with the Save public key.

创建公钥和私钥对后,我们可以保存这些创建的密钥。 我们可以使用Save public key将生成的Public Key保存到文件中。

Save Generated Public Key To A File
将生成的公钥保存到文件

将生成的私钥保存到文件(Save Generated Private Key To A File)

We can also save the generated Private Key into the file with the Save private key button like below.

我们还可以使用“ Save private key按钮将生成的私钥保存到文件中,如下所示。

Save Generated Private Key To A File
将生成的私钥保存到文件

从命令行使用默认选项创建密钥(Create Key with Default Options From Command Line)

We can generate keys with the following command. In this example, we will generate an RSA type key file named test.ppk . ppk is the extension of the putty keys.

我们可以使用以下命令生成密钥。 在此示例中,我们将生成一个名为test.ppk的RSA类型密钥文件。 ppk是油灰键的扩展名。

$ puttygen -t rsa -o test.ppk

从命令行设置密钥大小 (Set Key Size From Command Line)

We have the option to set the size of the putty key. More in size means more secure but less performance. But the performance loss is negligible. We can set the size with -b option. We will provide size as a bit unit. In this example, we will set the key file size 4096 bit .

我们可以选择设置油灰键的大小。 更大的尺寸意味着更安全,但性能更低。 但是性能损失可以忽略不计。 我们可以使用-b选项设置大小。 我们将以位为单位提供尺寸。 在此示例中,我们将设置密钥文件大小4096 bit。

$ puttygen -t rsa -b 4096 -o test.ppk

从命令行更改密码 (Change Passphrase From Command Line)

Keys are protected with symmetric encryption. This means ppk keys are encrypted and we need to use a passphrase. We can also change the current passphrase with -P option. In order to change the existing passphrase, we should provide old passphrases too.

密钥受对称加密保护。 这意味着ppk密钥已加密,我们需要使用密码短语。 我们还可以使用-P选项更改当前密码。 为了更改现有的密码短语,我们也应该提供旧的密码短语。

$ puttygen mykey.ppk -P

从命令行设置注释为键 (Set Comment To Key From Command Line)

In the enterprise environment, we may have multiple keys where we cannot remember actually what it was. Or we may need to put some comment about keys on the key file. We can use –C and the comment we want to set.

在企业环境中,我们可能有多个键,我们无法真正记住它是什么。 或者,我们可能需要在密钥文件上对密钥进行一些评论。 我们可以使用– C和我们要设置的注释。

$ puttygen mykey.ppk -C "My key"

翻译自: https://www.poftut.com/generate-putty-keys-wit-puttygen/

puttygen生成公私钥

puttygen生成公私钥_如何使用Puttygen生成腻子密钥?相关推荐

  1. rsa生成公私钥php,php中rsa生成公私钥和加解密

    php中rsa生成公私钥和加解密 注意:php使用RSA时需要开启openssl扩展 生成公私钥 //创建公私钥 $res = openssl_pkey_new(); //获取私钥 openssl_p ...

  2. golang 使用RSA生成公私钥,加密,解密,并使用SHA256进行签名,验证

    话不多说直接上代码: package mainimport ("crypto""crypto/rand""crypto/rsa"" ...

  3. linux 公私钥生成,[c++,openssl,RSA] linux下编程实现生成公私钥对_1

    在这篇文章中简单介绍一下如何编译安装和使用第三方库 OpenSSL ,并在 OpenSSL 提供的 API 的基础上生成存放 RSA 类型的公密钥对的文件. 什么是密钥 ? 密钥根据加密密钥和解密密钥 ...

  4. openssl 生成公私钥

    私钥 openssl genrsa -out rsa_private_key.pem 4096 同目录下 公钥 openssl rsa -in rsa_private_key.pem -pubout ...

  5. android平台使用java动态生成公私钥,并导出证书文件

    不依赖keytool工具,指令生成证书库,而是java代码生成,且导出到证书文件中.直接上代码: 证书工具类: package com.daobo.security.utilsimport com.d ...

  6. RSA生成公私钥并加解密

    1.RSA简介 RSA是目前使用最广泛的公钥密码体制之一,可以实现非对称加密.它是1977年由罗纳德·李维斯特(Ron Rivest).阿迪·萨莫尔(Adi Shamir)和伦纳德·阿德曼(Leona ...

  7. 数字钱包助记词生成公私钥流程分析

    salt : 通过生成一些随机的文本将其附加到密码上来生成 Hash, 主要目的是用来防止预先被计算好的彩虹表攻击. 1.助记词根据生成流程,可看数字钱包助记词生成浅析,返推算出随机byte数组. 2 ...

  8. 使用Openssl的RSA算法生成公私钥对

    openssl的安装参考这里:openssl的安装指导 非对称加密算法:RSA1024 /2048 /3072 /4096 在需要放置公私钥对所在的文件夹下,按住shift键点击右键,选择" ...

  9. 使用JDK自带的 keytool 工具生成公私钥证书库

    1.生成JKS密钥库,并查看证书 1.1.生成keystore文件 E:\license> keytool -genkeypair -keysize 2048 -validity 36500 - ...

  10. 使用ssh-keygen生成公私钥

    常用法: ssh-keygen -t rsa 参数: -t 密钥类型可以使用:"rsa1"(SSH-1) "rsa"(SSH-2) "dsa" ...

最新文章

  1. 程序员加班文化是怎么来的?
  2. IDEA下用SBT搭建Spark Helloworld
  3. SAP Spartacus如何创建自定义route页面
  4. Linux网络——一种强制门户技术
  5. 敏捷开发用户故事系列之一:何为用户故事
  6. Vue 组件 data为什么是函数
  7. 拓端tecdat|数据盘点高校新生录取情况
  8. java 注解处理器的作用_JVM进阶 -- 浅谈注解处理器
  9. unity素材三:未来城市场景
  10. 【百度LOGO权限】三天时间从获取LOGO权限到审核通过
  11. 线索二叉树的建立和遍历
  12. 基于PHP+MySQL长途客用汽车票订票系统的设计与实现
  13. Google Guava的5个鲜为人知的特性
  14. C++词法记号规则之标识符 关键字 操作符 分隔符 空白符
  15. 思科《计算机网络》第一章测试答案
  16. 转:Webrtc video framerate/resolution 自适应
  17. 安科瑞“智慧用电”一个适合高校学生公寓安全用电的智能控制与管理系统
  18. [附源码]java毕业设计毕业生离校管理系统
  19. php curl error code
  20. 嵌入式实时操作系统μC/OS-Ⅱ 在DSP芯片上的移植与测试

热门文章

  1. 多媒体SCM格式介绍
  2. wm java 载入jad错误_jad文件的错误代码,分享
  3. linux vi命令
  4. java语法正则表达式_详解Java正则表达式语法
  5. java正则表达式结尾_java 正则表达式
  6. 为何恒星/太阳(辐射)可以被视为黑体(辐射)?
  7. 关于数据中心PUE与计算机节能的探讨
  8. mx250显卡天梯图_2020新版显卡天梯图 RTX3060性能公布
  9. 计算机操作系统(第四版)第二章 习题答案
  10. 【教程】迅为iTOP-4412精英版exynos4412开发板搭建原生Linux最小系统(四)