简体   繁体   English

使用SSHTool将Putty私钥转换为OpenSSH私钥

[英]Use SSHTool to convert Putty Private Key to OpenSSH private key

In my java project I create a SSH tunnel with a server. 在我的Java项目中,我使用服务器创建了SSH隧道。 The tunnel is authenticated currently using a putty private key and plink. 当前使用腻子专用密钥和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? 有谁知道如何使用Java SSHTool库将腻子密钥转换为openssh密钥,或使用SSHTool库使用腻子密钥创建ssh隧道吗? Thank you. 谢谢。

Jsch only accepts opensh keys, not the format that putty creates the keys in. You would have to convert them. Jsch仅接受opensh密钥,而不接受腻子创建密钥的格式。您将不得不对其进行转换。 Use puttygen.exe to convert to openssh, then use the openssh keyfile in jsch. 使用puttygen.exe转换为openssh,然后在jsch中使用openssh密钥文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM