FileZilla 公钥不起作用(已成功从文件加载 0 个密钥对)

FileZilla 公钥不起作用(已成功从文件加载 0 个密钥对)

我目前无法使用 FileZilla 使用公钥登录。无论是 root 用户还是其他用户都不接受该密钥。

现在奇怪的是,当使用腻子时它可以毫无问题地工作。

我根本不知道问题是什么。

我检查过的内容:

  • 连接到服务器:
    服务器确实收到了身份验证尝试
  • 钥匙位于~/.ssh/authorized_keys
  • 文件权限正确700~/.ssh600~/.ssh/authorized_keys
  • 使用与 PuTTY 相同的密钥。这是在职的
  • 通过 SFTP 进行密码登录也可以正常工作
  • 尝试新密钥:同样不起作用(PuTTY 可以毫无问题地接受它)

日志:

油灰:

Event Log: Writing new session log (SSH packets mode) to file: PuTTY.log
Event Log: Looking up host "x.x.x.x"
Event Log: Connecting to x.x.x.x port 22
Event Log: Server version: SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
Event Log: Using SSH protocol version 2
Event Log: We claim version: SSH-2.0-PuTTY_Release_0.63_(file_config_0.6.1)
Event Log: Doing Diffie-Hellman group exchange
Event Log: Doing Diffie-Hellman key exchange with hash SHA-256
Event Log: Host key fingerprint is:
Event Log: ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Event Log: Initialised AES-256 SDCTR client->server encryption
Event Log: Initialised HMAC-SHA-256 client->server MAC algorithm
Event Log: Initialised AES-256 SDCTR server->client encryption
Event Log: Initialised HMAC-SHA-256 server->client MAC algorithm
Event Log: Reading private key file "C:\Program Files (x86)\Putty\PBS - Verknüpfungen\root.key.ppk"
Event Log: Offered public key
Event Log: Offer of public key accepted
Event Log: Sent public key signature
Event Log: Access granted
Event Log: Opening session as main channel
Event Log: Opened main channel
Event Log: Requesting X11 forwarding
Event Log: X11 forwarding enabled
Event Log: Allocated pty (ospeed 38400bps, ispeed 38400bps)
Event Log: Started a shell/command

FileZilla:

Status: Connecting to x.x.x.x...
Response:   fzSftp started, protocol_version=2
Command:    keyfile "C:\Program Files (x86)\Putty\PBS - Verknüpfungen\root.key.ppk"
Command:    open "[email protected]" 22
Trace:  Looking up host "x.x.x.x"
Trace:  Connecting to x.x.x.x port 22
Trace:  We claim version: SSH-2.0-PuTTY_Local:_Mar_29_2015_12:25:15
Trace:  Server version: SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
Trace:  We believe remote version has SSH-2 channel request bug
Trace:  Using SSH protocol version 2
Trace:  Doing ECDH key exchange with hash SHA-256
Trace:  Host key fingerprint is:
Trace:  ecdsa-sha2-nistp256 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Trace:  Initialised AES-256 SDCTR client->server encryption
Trace:  Initialised HMAC-SHA-256 client->server MAC algorithm
Trace:  Initialised AES-256 SDCTR server->client encryption
Trace:  Initialised HMAC-SHA-256 server->client MAC algorithm
Trace:  Successfully loaded 0 key pairs from file
Error:  Connection attempt interrupted by user

(最后一条消息是由于我被要求输入密码后按了取消而导致的)

答案1

可能是路径中的变音符号。FileZilla 和内部 psftp 进程之间的接口不支持 Unicode。

当我尝试带有变音符号的路径时,psftp 也没有加载密钥:

Trace:  Successfully loaded 0 key pairs from file

当我删除变音符号时,它起作用了:

Trace:  Successfully loaded 1 key pair from file
Trace:  Offered public key from "C:\path\key.ppk"

相关内容