SSH connection using ECDSA key type - WeOnlyDo Discussion board

SSH connection using ECDSA key type (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Mariana, Wednesday, February 22, 2017, 14:16 (2592 days ago)

Hello,

I can make a successful SSH connection (with private/public key) between a client application (Visual Studio on Windows 7) and a HP-UX server, using RSA key type and wodSFTP.dll.
But, using ECDSA key type, the SSH connection doesn't work. Moreover, I do not see anything in server syslog file.

Here's the code:
SFTPGetconnection(LPCTSTR pszDest, LPCTSR pszUname, LPCTSTR pszPsw) throw(...)
{
_bstrs_t fNamePriv = "C:\\Windows\\Raptor\\ .... "; // file name with private key

handle = Sftp_Create( ......) ;
Sftp_SetBlocking(handle, 1);
Sftp_SetHostname(handle, (char *) pszDest);
Sftp_SetLogin(handle, (char *) pszUname);
Sftp_SetPort(handle, 22);

// open the file with private key
long auth = Sftp_SetAuthentication(handle, AuthenticationsEnum::authPubkey);
long i = Sftp_LoadPrivateKey(handle, fNamePriv, (char *) pszPsw);
long j = Sftp_Connect(handle);
....
}
What changes should be made in order to use any key type (RSA/ECDSA) ?

Regards,
Mariana


Complete thread: