新Windows机器上的Putty和rsa公钥错误

时间:2018-12-04 23:49:24

标签: rsa putty

我有一台新的Windows计算机,并在其上安装了腻子。我从旧计算机中导出了注册表项,并导入了它们以恢复Putty连接并避免了手动添加它们。

我还将rsa公钥.ppk复制到了新计算机上,并在腻子的Auth部分中选择了它,但出现以下错误:

  

无法使用密钥文件“ c:\ path \ to \ id_rsa.ppk”(无法打开文件)

我很想再次在VPS服务器中重新生成密钥对,但是我认为公共密钥可以被任何计算机使用!

我想念什么吗?任何帮助表示赞赏。

谢谢!

编辑:

@Martin Prikryl请求的Plink输出(plink -v用户名@主机名-i“ c:\ path \ to \ id_rsa.ppk”):

We claim version: SSH-2.0-PuTTY_Release_0.70 Server version: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.1 Using SSH protocol version 2 Doing ECDH key exchange with curve Curve25519 and hash SHA-256 Server also has ssh-ed25519/ecdsa-sha2-nistp256 host keys, but we don't know any of them Host key fingerprint is: ssh-rsa 2048 24:2a:c3:65:b9:9a:3e:5f:59:fc:dc:15:42:31:0b:a0 Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA-256 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA-256 server->client MAC algorithm Reading key file "D:\path\to\id_rsa.ppk" Using username "user". Offered public key Offer of public key accepted Authenticating with public key "imported-openssh-key" Sent public key signature Access granted Opening session as main channel Opened main channel Allocated pty (ospeed 38400bps, ispeed 38400bps) Started a shell/command

编辑2:

putty.exe -v用户名@主机名-i“ c:\ path \ to \ id_rsa.ppk”引发超时错误。

2 个答案:

答案 0 :(得分:0)

似乎您没有在 Connection> SSH> Auth 页面上“选择”密钥。

您只想在其中键入键名,没有路径。因此,腻子找不到它。

您需要使用密钥文件的完整路径,例如C:\path\to\id_rsa.ppk

答案 1 :(得分:-1)

遵循此link

You used Putty Private Key format (.ppk)
Convert your ppk to Openssh Key File (id_rsa)

here是一个说明。希望对您有所帮助。