1

putty 的 ppk 和 openssh 的 rsa 密钥互转

 1 year ago
source link: https://xujinzh.github.io/2023/02/20/format-conversion-putty-ppk-openssh-rsa/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

putty 的 ppk 和 openssh 的 rsa 密钥互转

2023-02-20technologylinux

2 377 1 分钟

putty 密钥格式是 ppk,它无法被 openssh 直接使用。反过来,openssh 的密钥 id_rsa 也无法被 putty 所使用。如果想要在不同软件下使用,需要进行密钥格式转换。

ppk 转 id_rsa

如果有 putty 软件,那么可以在软件上直接操作。我们这里使用命令行操作方式。首先按照命令:

sudo apt update
sudo apt install putty-tools -y

转换方法如下:

# ppk 转换为 id_rsa
puttygen test.ppk -O private-openssh -o id_rsa
# ppk 转换为 id_rsa.pub
puttygen test.ppk -O public-openssh -o id_rsa.pub

id_rsa 转 ppk

puttygen id_rsa -o test.ppk
  1. PuTTY的ppk密钥与OpenSSH密钥之间的相互转换

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK