简体   繁体   English

ssh密钥生成中使用的密码短语是什么?

[英]What is the passphrase used for in ssh key generation?

I was setting up ssh for github and I found it interesting that in addition to a public and private key, a "passphrase" is also needed. 我正在为github设置ssh,我发现有趣的是,除了公共和私有密钥之外,还需要一个“密码”。

The public/private key pair is generated automatically and the passphrase is asked for after the generation. 公钥/私钥对将自动生成,并在生成后要求输入密码。

Here is the github documentation. 这是github文档。 . What is the purpose of this "passphrase". 此“密码短语”的目的是什么。

Does it effect the public and private key generation? 它会影响公钥和私钥的生成吗?

The passphrase is used to lock access to the private SSH key. 密码短语用于锁定对私有SSH密钥的访问。 The reason you use keys is to have something more secure than passwords, but a private keyfile without protection will grant access to all your systems to anyone who accesses your computer. 使用密钥的原因是要比密码更安全,但是没有保护的私有密钥文件将把访问所有系统的权限授予访问您计算机的任何人。 So, the passphrase is there to add an extra security layer. 因此,密码短语在那里添加了额外的安全层。

It does not effect the public/private key generation. 它不影响公钥/私钥的生成。 It is simply used as an added precaution so that someone who gains access to your PC or similar does not have complete access to all your files. 它只是作为一种额外的预防措施而使用,以使能够访问您的PC或类似设备的人无法完全访问您的所有文件。

They will still need a passphrase which is paired with the private key to identify you. 他们仍将需要一个密码短语,该密码短语与私钥配对以识别您的身份。

This passphrase can be saved so that you only have to use it once. 可以保存此密码,因此您只需使用一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM