convert putty key to openssh key

有的合作方给的是putty生成的私钥,为了方便使用需要把putty格式的转化成openssh格式的
pm@debian:~$ puttygen –help
PuTTYgen unidentified build, Jun 22 2012 15:52:56
Usage: puttygen ( keyfile | -t type [ -b bits ] )
[ -C comment ] [ -P ] [ -q ]
[ -o output-keyfile ] [ -O type | -l | -L | -p ]
-t specify key type when generating (rsa, dsa, rsa1)
-b specify number of bits when generating key
-C change or specify key comment
-P change key passphrase
-q quiet: do not display progress bar
-O specify output type:
private output PuTTY private key format
private-openssh export OpenSSH private key
private-sshcom export ssh.com private key
public standard / ssh.com public key
public-openssh OpenSSH public key
fingerprint output the key fingerprint
-o specify output file
-l equivalent to `-O fingerprint’
-L equivalent to `-O public-openssh’
-p equivalent to `-O public’

1.如果对方给的ppk是带密码的,可以使用puttygen把秘密去掉
puttygen xxx.ppk -P
输入原有的密码后,新密码为空就行了。
2.把ppk格式的转化成openssh的
puttygen xxx.ppk -o xxx.txt -O private-openssh
这样就可以把xxx.ppk导出为 openssh 的私钥xxx.txt

此条目发表在System分类目录。将固定链接加入收藏夹。

发表评论