I'm trying to do a sftp connection. The destination uses public key + password authentication, and port 2222.

I was able to connect from our existing linux host to the destination. Our existing linux host uses Openssh_5.3.

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

I'm not able to connect from our next linux host. It uses OpenSSH_6.6.1. Our new linux host has same outbound IP and the destination is not filtering connection by IP address. I'm using the exactly same private key file and sftp command. So it seems like an ssh issue?

The error I got is:

sftp -v -oPort=2222 -oIdentityFile=/home/xyz/.ssh/abc/id_rsa user@sftp.abc.comdebug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Offering RSA public key: /home/xyz/.ssh/abc/id_rsadebug1: Server accepts key: pkalg ssh-rsa blen 277debug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAAuthenticated with partial success.debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Offering RSA public key: ..........debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Offering RSA public key: /home/xyz/.ssh/abc/id_rsadebug1: Server accepts key: pkalg ssh-rsa blen 277debug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAAuthenticated with partial success.debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: 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.

If I run with -vvv, here's the output:

debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Trying private key: /home/xyz/.ssh/abc/id_rsadebug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAdebug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20debug2: we sent a publickey packet, wait for replyAuthenticated with partial success.debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicitdebug2: key: /home/xyz/.ssh/id_rsa ((nil)),debug2: key: /home/xyz/.ssh/id_dsa ((nil)),debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Trying private key: /home/xyz/.ssh/abc/id_rsadebug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAdebug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20debug2: we sent a publickey packet, wait for replyAuthenticated with partial success.debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicitdebug2: key: /home/xyz/.ssh/id_rsa ((nil)),debug2: key: /home/xyz/.ssh/id_dsa ((nil)),debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Trying private key: /home/xyz/.ssh/abc/id_rsadebug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAdebug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20debug2: we sent a publickey packet, wait for replyAuthenticated with partial success.debug2: key: /home/xyz/.ssh/abc/id_rsa ((nil)), explicitdebug2: key: /home/xyz/.ssh/id_rsa ((nil)),debug2: key: /home/xyz/.ssh/id_dsa ((nil)),debug1: Authentications that can continue: password,publickey,keyboard-interactivedebug1: Trying private key: /home/xyz/.ssh/abc/id_rsadebug1: key_parse_private2: missing begin markerdebug1: read PEM private key done: type RSAdebug3: sign_and_send_pubkey: RSA 7f:69:c6:c9:be:54:6e:7a:35:7d:63:b6:7f:28:0f:20debug2: we sent a publickey packet, wait for replyThis goes on again and again, so I just killed it.

migrated from stackoverflow.com Dec 20 '16 at 0:44

This question came from our site for professional and enthusiast programmers.

  • Are the private keys really the same? Can you compare a hash of them to be sure?– ivanivanDec 19 '16 at 16:22
  • Yes they're the same. They're the same file under my home directory. The home directory files are shared across different hosts– FeiiiiiiiiiiiiiDec 19 '16 at 16:31
  • I'll create a thread on Unix & Linux, but I'm not able to do that now. I need to wait for 40min to do another post.– FeiiiiiiiiiiiiiDec 19 '16 at 16:32
  • Post the whole log. you might exclude something what is important.– JakujeDec 19 '16 at 16:36
  • I added some more log– FeiiiiiiiiiiiiiDec 19 '16 at 17:17

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.