码迷,mamicode.com
首页 > 系统相关 > 详细

how-to-convert-ppk-key-to-openssh-key-under-linux

时间:2019-12-27 00:31:08      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:move   pair   os x   open   merge   ace   ini   acm   ssi   

Do it with Putty.

  • Linux: with your package manager, install PuTTY (or the more minimal PuTTY-tools):

    • Ubuntu sudo apt-get install putty-tools
    • Debian-like apt-get install putty-tools
    • RPM based yum install putty
    • Gentoo emerge putty
    • Archlinux sudo pacman -S putty
    • etc.
  • OS X: Install Homebrew, then run brew install putty

Place your keys in some directory, e.g. your home folder. Now convert the PPK keys to SSH keypairs:cache search

To generate the private key:

cd ~
puttygen id_dsa.ppk -O private-openssh -o id_dsa

and to generate the public key:

puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub

Move these keys to ~/.ssh and make sure the permissions are set to private for your private key:

mkdir -p ~/.ssh
mv -i ~/id_dsa* ~/.ssh
chmod 600 ~/.ssh/id_dsa
chmod 666 ~/.ssh/id_dsa.pub

If you have already tried to perform a ‘git clone‘ operation you might need to do this also

chmod 666 ~/.ssh/known_hosts

how-to-convert-ppk-key-to-openssh-key-under-linux

标签:move   pair   os x   open   merge   ace   ini   acm   ssi   

原文地址:https://www.cnblogs.com/johnsonshu/p/12105012.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!