SSH连接通过PPK无需密码 [英] SSH Connection through PPK without password

查看:515
本文介绍了SSH连接通过PPK无需密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以通过 帮助我建立SSH连接吗? 仅通过用户名和私钥对
进行身份验证当前的SSH.NET库。我无法从用户那里获得密码,所以这是不可能的。

能够通过将.ppk文件提供给Pageant来手动建立ssh连接。现在,寻找一些通过C#建立连接的解决方案。

信息对我很方便" 主机,用户名& .ppk文件"

我通过其他来源找到了以下解决方案,但这会引起期望 - "无效私钥文件"

请帮我解决此异常或任何其他解决方案。

Please help me to resolve this exception or any alternative solution.

提前致谢!

推荐答案

您好Venkat6332,

Hi Venkat6332,

感谢您在此发帖。

对于您的问题,您希望解决此"异常私钥文件"的异常。

For your question, you want to resolve this exception that "Invalid Private Key File".

我的建议是更改格式密钥从.ppk到OpenSSH。

My suggestion is to change the format of the key from .ppk to OpenSSH.

使用PuttyGen生成并转换密钥(转换 - >导出OpenSSH密钥)。

Use PuttyGen to generate and convert the key (Conversion -> export OpenSSH Key).

所以我的密钥路径如下:

So my key path is the following:

var privateKeyLocation = @"C:\Users\xxx\Desktop\new";




这是一个新的OpenSSH Key形式。

This new is the form of OpenSSH Key.

祝你好运,

张龙


这篇关于SSH连接通过PPK无需密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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