无法使用 public/private 键连接到 Linode

Unable to connect to Linode with public/private key

我无法使用 Puttygen 生成的 public/private 密钥连接 Putty 和 WinSCP。我有选美比赛 运行 在后台。它告诉我该密钥被服务器拒绝:( 请参阅下面的 WinSCP 输出。

知道如何解决这个问题吗?

编辑:对于 Putty 和 WinSCP,重复出现的错误消息是:

`Unable to use key file "C:\Program Files (x86)\PuTTY\private_key.ppk" (unable to open file)`

以下是来自 WinSCP 的错误日志:

. 2015-02-27 11:56:56.744 --------------------------------------------------------------------------
. 2015-02-27 11:56:56.744 WinSCP Version 5.5.6 (Build 4746) (OS 6.3.9600 - Windows 8.1)
. 2015-02-27 11:56:56.744 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2015-02-27 11:56:56.745 Local account: STICKSWORD\Michael
. 2015-02-27 11:56:56.745 Working directory: C:\Program Files (x86)\WinSCP
. 2015-02-27 11:56:56.745 Process ID: 4324
. 2015-02-27 11:56:56.745 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
. 2015-02-27 11:56:56.745 Time zone: Current: GMT-5, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/8/2015, DST End: 11/1/2015
. 2015-02-27 11:56:56.745 Login time: Friday, February 27, 2015 11:56:56 AM
. 2015-02-27 11:56:56.745 --------------------------------------------------------------------------
. 2015-02-27 11:56:56.745 Session name: paraderest (Site)
. 2015-02-27 11:56:56.745 Host name: 66.228.42.37 (Port: 22)
. 2015-02-27 11:56:56.745 User name:  (Password: No, Key file: Yes)
. 2015-02-27 11:56:56.745 Tunnel: No
. 2015-02-27 11:56:56.745 Transfer Protocol: SFTP (SCP)
. 2015-02-27 11:56:56.745 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2015-02-27 11:56:56.745 Proxy: none
. 2015-02-27 11:56:56.745 Send buffer: 262144
. 2015-02-27 11:56:56.745 SSH protocol version: 2; Compression: No
. 2015-02-27 11:56:56.745 Bypass authentication: No
. 2015-02-27 11:56:56.745 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2015-02-27 11:56:56.745 GSSAPI: Forwarding: No; Server realm: 
. 2015-02-27 11:56:56.745 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2015-02-27 11:56:56.745 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2015-02-27 11:56:56.745 Simple channel: Yes
. 2015-02-27 11:56:56.745 Return code variable: Autodetect; Lookup user groups: A
. 2015-02-27 11:56:56.746 Shell: default
. 2015-02-27 11:56:56.746 EOL: 0, UTF: 2
. 2015-02-27 11:56:56.746 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2015-02-27 11:56:56.746 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2015-02-27 11:56:56.746 SFTP Bugs: A,A
. 2015-02-27 11:56:56.746 SFTP Server: default
. 2015-02-27 11:56:56.746 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2015-02-27 11:56:56.746 Cache directory changes: Yes, Permanent: Yes
. 2015-02-27 11:56:56.746 DST mode: 1; Timezone offset: 0h 0m
. 2015-02-27 11:56:56.746 --------------------------------------------------------------------------
. 2015-02-27 11:56:56.821 Looking up host "66.228.42.37"
. 2015-02-27 11:56:56.821 Connecting to 66.228.42.37 port 22
. 2015-02-27 11:56:57.106 Server version: SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze2
. 2015-02-27 11:56:57.106 Using SSH protocol version 2
. 2015-02-27 11:56:57.106 We claim version: SSH-2.0-WinSCP_release_5.5.6
. 2015-02-27 11:56:57.145 Doing Diffie-Hellman group exchange
. 2015-02-27 11:56:57.283 Doing Diffie-Hellman key exchange with hash SHA-256
. 2015-02-27 11:56:58.052 Verifying host key rsa2 0x10001,0xc6a6132527e50389 28ae28852cc474b0 29aab41436be0289 53429f1f719ac6ae eaa5bfc3d0bac53d fb037711f24c9dc9 9b745912f477e281 ad93820b73ccd6a0 b393e9baf6528f86 083b86ddd14dd548 8a981b7aaca7578f b7b522f4594deebd a90a53a2790c2953 91137ba497543b0a 522fe7631fa8fc23 c526324723d4edff daa8baddb0f5788c 50952d3d3f83245f 7b14e5f1aa58d8ee 05fafc42afe49b4f b7aea54028511dd9 2fbb64b8ab64242a baddacc671222d50 2259ede8629aafe1 ecca71a3fcabdbe3 9ae53b9bd24aa8ef 602af53fbdd46e27 17d64cff5bf3e126 76aef0e4af37b830 96990e6bc8d1d494 d2d22671516ea046 bd2b4e22e78ce103  with fingerprint ssh-rsa 2048 9e:3c:df:46:02:f2:3e:1d:b7:d6:b7:b7:c2:f5:20:ef
. 2015-02-27 11:56:58.076 Host key matches cached key
. 2015-02-27 11:56:58.076 Host key fingerprint is:
. 2015-02-27 11:56:58.076 ssh-rsa 2048 9e:3c:df:46:02:f2:3e:1d:b7:d6:b7:b7:c2:f5:20:ef
. 2015-02-27 11:56:58.076 Initialised AES-256 SDCTR client->server encryption
. 2015-02-27 11:56:58.076 Initialised HMAC-SHA1 client->server MAC algorithm
. 2015-02-27 11:56:58.076 Initialised AES-256 SDCTR server->client encryption
. 2015-02-27 11:56:58.076 Initialised HMAC-SHA1 server->client MAC algorithm
. 2015-02-27 11:56:58.280 Reading private key file "C:\Program Files (x86)\PuTTY\private_key.ppk"
. 2015-02-27 11:56:58.280 Unable to use this key file (unable to open file)
! 2015-02-27 11:56:58.280 Unable to use key file "C:\Program Files (x86)\PuTTY\private_key.ppk" (unable to open file)
. 2015-02-27 11:56:58.344 Pageant is running. Requesting keys.
. 2015-02-27 11:56:58.344 Pageant has 1 SSH-2 keys
. 2015-02-27 11:56:58.344 Prompt (2, SSH login name, , login as: )
. 2015-02-27 11:56:58.430 Trying Pageant key #0
. 2015-02-27 11:56:58.465 Server refused our key
. 2015-02-27 11:56:58.466 Disconnected: No supported authentication methods available (server sent: publickey)
* 2015-02-27 11:56:58.524 (EFatal) Disconnected: No supported authentication methods available (server sent: publickey)
* 2015-02-27 11:56:58.524 Authentication log (see session log for details):
* 2015-02-27 11:56:58.524 Unable to use key file "C:\Program Files (x86)\PuTTY\private_key.ppk" (unable to open file)
* 2015-02-27 11:56:58.524 
* 2015-02-27 11:56:58.524 Authentication failed.

检查密钥是否在 Linode 上 ~/.ssh 文件夹中的 authorized_keys 文件中。或许可以通过 Linode 的 Lish 浏览器执行此操作,然后再尝试 ssh。