sftp连接太多的publickey验证尝试都出错了


1

我正在尝试进行sftp连接。目的地使用公钥+密码认证和端口2222。

我能够从现有的linux主机连接到目的地。我们现有的linux主机使用Openssh_5.3。

sftp -v -oPort=2222 -oIdentityFile=/home/xyz/.ssh/abc/id_rsa user@sftp.abc.com
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering public key: /home/xyz/.ssh/abc/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering public key ...
...
debug1: Next authentication method: keyboard-interactive
Here it goes to the next authentication method keyboard-interactive with no problem.

我无法从我们的下一个linux主机连接。它使用OpenSSH_6.6.1。我们的新linux主机具有相同的出站IP,目标不是按IP地址过滤连接。我正在使用完全相同的私钥文件和sftp命令。所以这似乎是一个ssh问题?

我得到的错误是:

sftp -v -oPort=2222 -oIdentityFile=/home/xyz/.ssh/abc/id_rsa user@sftp.abc.com
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering RSA public key: /home/xyz/.ssh/abc/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering RSA public key: ....
......
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering RSA public key: /home/xyz/.ssh/abc/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
Authenticated with partial success.
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Offering RSA public key: ....
......
Here it goes as infinite loop and keep trying the same private key again and again (although it already got partial success)
until it got "**Too many publickey verification attempts were made**" error.

如果我用-vvv运行,这是输出:

debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /home/xyz/.ssh/abc/id_rsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicit
debug2: key: /home/xyz/.ssh/id_rsa ((nil)),
debug2: key: /home/xyz/.ssh/id_dsa ((nil)),
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /home/xyz/.ssh/abc/id_rsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicit
debug2: key: /home/xyz/.ssh/id_rsa ((nil)),
debug2: key: /home/xyz/.ssh/id_dsa ((nil)),
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /home/xyz/.ssh/abc/id_rsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicit
debug2: key: /home/xyz/.ssh/id_rsa ((nil)),
debug2: key: /home/xyz/.ssh/id_dsa ((nil)),
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /home/xyz/.ssh/abc/id_rsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20
debug2: we sent a publickey packet, wait for reply

This goes on again and again, so I just killed it.

私钥真的一样吗?你能比较一下它们的哈希值吗?

是的他们是一样的。它们是我的主目录下的同一个文件。主目录文件在不同的主机上共享
Feiiiiiiiiiiiii

我将在Unix和Linux上创建一个线程,但我现在无法做到这一点。我需要等待40分钟再做一个帖子。
Feiiiiiiiiiiiii 2016年

发布整个日志。你可能会排除重要的东西。
Jakuje 2016年

我添加了一些更多的日志
Feiiiiiiiiiiiii 2016年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.