JSCH - Invalid private key

前端 未结 5 1811
甜味超标
甜味超标 2020-12-06 00:43

I am running JDK 1.7 & Windows 7 using netbeans 7.2 I have generated a SSH private & public key pair (SSH2-2048 bits) using putty-keygen. I do not have any password

5条回答
  •  我在风中等你
    2020-12-06 01:32

    I bumped into same issue while using ppk to ssh using JSch. This might work for someone.

    While using the ppk file from Putty it used to work. But using the same with JSch, it used to throw this exception.

    I tried a couple of solutions. Finally i just loaded the ppk file to PuTTYgen and Save Private Key which generated similar looking (in text editor) file but it worked.

    1. Press 'Load' and select the ppk file
    2. Enter the passphrase
    3. Click on 'Save private key' button just below Load option and save the private key

提交回复
热议问题