fail to connect by public key (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi Simona,
yes, wodSFTPdll works for us without any issues. Here's my code I tested with. If you send email to techsupport - at - weonlydo.com, I can provide full code and key you can test with to try it out with our server. Here's partial key since it's too large to paste here (and, of course, I can't just let anyone connect for tests...)
Note I don't use wodKeys - it's not needed with wodSFTPdll since it's capable of loading key using LoadPrivateKey when you give full key instead of filename.
Here's the code:
char buf[8192];
handle = Sftp_Create(&mystruct, NULL);
Sftp_SetBlocking(handle, 1);
Sftp_SetHostname(handle, "linux.weonlydo.com");
Sftp_SetLogin(handle, "weonlydo");
Sftp_SetAuthentication(handle, /*AuthenticationsEnum::*/authPubkey);
Sftp_LoadPrivateKey(handle, "-----BEGIN RSA PRIVATE KEY-----\r\nMIIEoQIBAAKCAQE....Me0sT4YJ0g6FYBP2Dvdw+Q==\r\n-----END RSA PRIVATE KEY-----\r\n", NULL);
printf("Connecting...\r\n");
Sftp_SetPort(handle, 22);
int i = Sftp_Connect(handle);
So, code is more/less same as yours, connecting against OpenSSH server running on Ubuntu linux.
Kind regards,
Jasmine.
Complete thread:
- fail to connect by public key - simonasuciu, 2017-01-17, 14:38
- fail to connect by public key - Jasmine, 2017-01-17, 14:47
- fail to connect by public key - simonasuciu, 2017-01-18, 11:28
- fail to connect by public key - Jasmine, 2017-01-18, 11:29
- fail to connect by public key - simonasuciu, 2017-01-18, 15:05
- fail to connect by public key - Jasmine, 2017-01-18, 16:43
- fail to connect by public key - simonasuciu, 2017-01-19, 11:43
- fail to connect by public key - Jasmine, 2017-01-19, 11:44
- fail to connect by public key - simonasuciu, 2017-01-19, 12:13
- fail to connect by public key - Jasmine, 2017-01-19, 12:56
- fail to connect by public key - simonasuciu, 2017-01-19, 12:13
- fail to connect by public key - Jasmine, 2017-01-19, 11:44
- fail to connect by public key - simonasuciu, 2017-01-19, 11:43
- fail to connect by public key - Jasmine, 2017-01-18, 16:43
- fail to connect by public key - simonasuciu, 2017-01-18, 15:05
- fail to connect by public key - Jasmine, 2017-01-18, 11:29
- fail to connect by public key - simonasuciu, 2017-01-18, 11:28
- fail to connect by public key - Jasmine, 2017-01-17, 14:47