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.

0