This project has moved and is read-only. For the latest updates, please go here.

Authentication fails for 'Publickey + Password' method

Jun 14, 2012 at 10:59 AM

Hello,

When I configured the SFTP server's SSH Authenticate method as 'Public key as well as Password', the connection always fails. It works fine when I jus enable public key method or just 'password' method, but not both. Is it an expected behaviour ?

I tested the same scenario with psftp client, it connected to the server and prompts:- 'Further authentication required', when i entered the user's password, it let me in.

Your answer will help a lot, before I dig inside the code.

Many thanks
Bala Subban.


I'm using Cerberus sftp server. SFTP server side  logs are ...


2012/06/13 17:18:52     [382]     Incoming connection request on SSH interface 650 at 127.0.0.1
2012/06/13 17:18:52     [382]     SSH FTP connection request accepted from 127.0.0.1
2012/06/13 17:18:52     [382]     Client Identification: SSH-2.0-SharpSSH-1.1.1.13-JSCH-0.1.28
2012/06/13 17:18:52     [382]     Algorithm negotiation complete: Proceeding with key exchange
2012/06/13 17:18:52     [382]     Kex: 'diffie-hellman-group1-sha1' Host Key: 'ssh-rsa' C2S : '3des-cbc, hmac-md5, none' S2C : '3des-cbc, hmac-md5, none'
2012/06/13 17:18:53     [382]     DH Key sizes: Server Public '1024', Private '1023', Client Public '1024'
2012/06/13 17:18:53     [382]     Public key presented matches public key for user 'a1'
2012/06/13 17:18:53     [382]     Signature verified with public key presented by user 'a1'
2012/06/13 17:18:53     [382]     Disconnect reason: Tamir.SharpSsh.jsch.JSchPartialAuthException: password     at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)

Biztalk side logs:-

Method: Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect
Error: Unable to connect to Sftp host [localhost]

------------------------------
Information:
Type: System.Exception
Target:
Message: Unable to connect to Sftp host [localhost]
Stacktrace:

------------------------------
Type: Tamir.SharpSsh.jsch.JSchPartialAuthException
Target: Void connect(Int32)
Message: password
Stacktrace:
   at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
   at Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
   at Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
   at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)

Jun 14, 2012 at 11:49 AM
I haven't seen any scenarios where using both public key and password. However, both in the combination with pass phrase is common. I'm not sure if the underlying framwork (SharpSSH) allows both public key and password, but there are no logic in the adapter prohibiting you from doing it.

// Mikael

From: [email removed]
To: [email removed]
Date: Thu, 14 Jun 2012 02:59:45 -0700
Subject: Authentication fails for 'Publickey + Password' method [SftpAdapter:359568]

From: balasubban
Hello,
When I configured the SFTP server's SSH Authenticate method as 'Public key as well as Password', the connection always fails. It works fine when I jus enable public key method or just 'password' method, but not both. Is it an expected behaviour ?
I tested the same scenario with psftp client, it connected to the server and prompts:- 'Further authentication required', when i entered the user's password, it let me in.
Your answer will help a lot, before I dig inside the code.

Many thanks
Bala Subban.


I'm using Cerberus sftp server. SFTP server side logs are ...

2012/06/13 17:18:52 [382] Incoming connection request on SSH interface 650 at 127.0.0.1
2012/06/13 17:18:52 [382] SSH FTP connection request accepted from 127.0.0.1
2012/06/13 17:18:52 [382] Client Identification: SSH-2.0-SharpSSH-1.1.1.13-JSCH-0.1.28
2012/06/13 17:18:52 [382] Algorithm negotiation complete: Proceeding with key exchange
2012/06/13 17:18:52 [382] Kex: 'diffie-hellman-group1-sha1' Host Key: 'ssh-rsa' C2S : '3des-cbc, hmac-md5, none' S2C : '3des-cbc, hmac-md5, none'
2012/06/13 17:18:53 [382] DH Key sizes: Server Public '1024', Private '1023', Client Public '1024'
2012/06/13 17:18:53 [382] Public key presented matches public key for user 'a1'
2012/06/13 17:18:53 [382] Signature verified with public key presented by user 'a1'
2012/06/13 17:18:53 [382] Disconnect reason: Tamir.SharpSsh.jsch.JSchPartialAuthException: password at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
Biztalk side logs:-

Method: Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect
Error: Unable to connect to Sftp host [localhost]

------------------------------
Information:
Type: System.Exception
Target:
Message: Unable to connect to Sftp host [localhost]
Stacktrace:

------------------------------
Type: Tamir.SharpSsh.jsch.JSchPartialAuthException
Target: Void connect(Int32)
Message: password
Stacktrace:
at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
at Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
at Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)
Read the full discussion online.
To add a post to this discussion, reply to this email (SftpAdapter@discussions.codeplex.com)
To start a new discussion for this project, email SftpAdapter@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com