public key authentication using wodSFTP 2.2.2 (eva - WeOnlyDo Discussion board

public key authentication using wodSFTP 2.2.2 (eva (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Dennis Griesser, Friday, March 04, 2005, 02:33 (7004 days ago)

I am using wodSFTP 2.2.2 (eval) in a PowerBuilder 8.0.4 development environment.

My SFTP server is Bitvise WinSSHD 3.31 (eval). It is configured to authenticate via either a password or a public key.

I can use wodKeys to generate, import, and export keys. Everything seems to work fine: imported and exported keys are compatible with other applications, and MD5 fingerprints match after transferring keys.

I can use wodSFTP to connect to the SFTP server, using code similar to this:
wodSFTPObject.Authentication = authPassword {value=1}
wodSFTPObject.Password = as_PassWd
(where as_PassWd is a string variable that contains the printable text for the password)
It connects fine.

ISSUE #1

Right after a good connection with password, I disconnect, and change parameters to public key, like this:
wodSFTPObject.Authentication = authPubkey {value=2}
wodSFTPObject.PrivateKey = abl_MyKey
(where abl_MyKey is a blob variable that contains the binary string of the private key)
I then attempt to connect again.

I get a successful connection, but wodSFTP is using the old password (instead of the requested public key). This doesn't sound right.

I can get rid of this behavior by explicitly clearing the password like this:
wodSFTPObject.Password =
wodSFTPObject.Authentication = authPubkey {value=2}
wodSFTPObject.PrivateKey = abl_MyKey

ISSUE #2

Now I am set up for authentication only via public key:
wodSFTPObject.Password =
wodSFTPObject.Authentication = authPubkey {value=2}
wodSFTPObject.PrivateKey = abl_MyKey
But I can't connect. I get:
error number = 30015
error text = Invalid username or password reported by server.

I am reasonably sure that I have everything configured properly: After setting the wodSFTPObject.PrivateKey property, I can read it back and get the same key. I can use a different SFTP client (Secure FX 2.2.9) to connect to the SFTP server using public key authentication.

Do you have any suggestions?


Complete thread: