In my java project I create a SSH tunnel with a server. The tunnel is authenticated currently using a putty private key and plink. Does anybody know how to use the java SSHTool library to either convert a putty key to a openssh key or use SSHTool library to create a ssh tunnel using a putty key? Thank you.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Jsch only accepts opensh keys, not the format that putty creates the keys in. You would have to convert them. Use puttygen.exe to convert to openssh, then use the openssh keyfile in jsch.