日期:2014-05-16  浏览次数:20745 次

linux 下转化 ppk 文件 为openssh 文件(private,public)
1. 首先安装: puttygen
ubuntu :
sudo apt-get install puttygen-tools

或者下载
http://the.earth.li/~sgtatham/putty/latest/putty-0.62.tar.gz

2. ppk 文件转化 openssh key
   private key :
  puttygen /path/to/puttykey.ppk -O private-openssh -o ~/.ssh/id_rsa

   public key:
 
 puttygen /path/to/puttykey.ppk -O public-openssh -o ~/.ssh/id_rsa.pub

3. 将产生的public key 在git server 服务端更新
 
1 楼 pobing 2012-05-09  
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'