Xshell 如何导入 PuTTYgen 生成的 key

在我们成功部署 Public Key 到服务器上后,你需要使用 Private Key 来访问服务器或者数据。

PuTTYgen 生成的 Key 的后缀名 ppk,没有办法导入到 xshell 中。

如何解决这个问题?

key-error-01

问题和解决

出现这个问题的原因是因为 PuTTYgen 生成的私有 key 只能在 PuTTYgen 上使用。

因此你需要将 PuTTYgen 的 Key 转换为 OpenSSH Key。

在 PuTTYgen 上,先导入私有的 Key。

key-error-02

选择菜单栏中的转换,然后导出为 OpenSSH Key。

key-error-03

然后将导出的 Key 保存到你的文件系统上。

然后再次从 xshell 上导入即可。

key-error-04

在 xshell 的登录授权配置部分,你需要选择导入的 Key 来进行登录。

按照上图的配置,就可以顺利的使用 PuTTYgen 生成的 key 来登录远程服务器了。

https://www.ossez.com/t/xshell-puttygen-key/13557

原文地址:https://www.cnblogs.com/huyuchengus/p/15004589.html