JSch如何与PuTTY私钥一起使用 [英] JSch how to use with PuTTY private key

查看:144
本文介绍了JSch如何与PuTTY私钥一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将JSch与私钥配置一起使用.我已经使用PuTTYgen生成了公钥和私钥,但是不确定如何处理这两个文件.

I'm trying to use JSch with a private key configuration. I've generated a public and private key using PuTTYgen but am unsure what to do with both of the files.

哪个密钥(公钥/私钥)需要转移到服务器?

Which key (public/private) needs transferring to the server?

推荐答案

  • 首先,您需要在服务器上注册PuTTYgen生成的 public 密钥.请参见为公钥认证做好准备或(我)设置SSH公钥身份验证.

    • First, you need to register your PuTTYgen-generated public key on the server. See Getting ready for public key authentication or (my) Set up SSH public key authentication.

      最后,请参见我们可以使用JSch进行基于SSH密钥的通信吗?有关使用 private 键.

      And finally see Can we use JSch for SSH key-based communication? for details on using the private key in JSch.

      请确保使用最新版本的JSch,因为较旧的版本本身不支持.ppk格式.

      Make sure you use the latest version of JSch, as older versions do not support the .ppk format natively.

      这篇关于JSch如何与PuTTY私钥一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆