Invalid private key when opening SSH tunnel with JSch

前端 未结 2 350
醉酒成梦
醉酒成梦 2021-01-14 06:32

With JSch I\'m calling addIdentity() to add a private key and getSession() to open an SSH tunnel.

When running this code locally on my Windows machine the opening of

相关标签:
2条回答
  • 2021-01-14 06:50

    My problem was solved by using pem file instead of ppk.

    pem file is in OpenSSH format that com.jcraft.jsch.JSch jar requires

    0 讨论(0)
  • 2021-01-14 07:11

    My educated guess is that jSCh does not support PuTTY key format, but rather standard PEM or OpenSSH format. You can convert the PPK to PEM in the PuTTYgen and it should solve your problems.

    0 讨论(0)
提交回复
热议问题