If you are trying to connect to your SFTP server with TWebUpdate
or TWebCopy
then first read requirements. Further below you can also find some steps that can get you moving forward if you experience exceptions when you start your application or try to connect.
DLL requirements
This is always the first step, make sure you have all the necessary DLLs for your application to load. The following DLLs are required:
libssh2.dll
libssl-1_1.dll
libcrypto-1_1.dll
For 64-bit applications use libssh2_x64.dll
, libssl-1_1_x64.dll
and libcrypto-1_1_x64.dll
but don't forget to remove the _x64
suffix. You can find all these DLLs in your installation folder.
Old DLL versions
Previously older version of DLLs were distributed, namely:
libeay32.dll
ssleay32.dll
If you are suddenly having issues connecting to your server, please try with the newer DLLs:
- Remove
libeay32.dll
andssleay32.dll
.- Add
libssl-1_1.dll
andlibcrypto-1_1.dll
from the installation folder.- Replace
libssh2.dll
with a newer one from the installation folder.
I get the following message: "Update failed with external exception C06D007E"
If your application can load the required DLLs listed but you see the message above, it's possible you are missing one more DLL that should be available on your system by default: MSVCR110.dll
.
You can obtain this by installing the 32-bit version of Visual C++ Redistributable for Visual Studio 2012 Update 4: https://www.microsoft.com/en-us/download/details.aspx?id=30679
I still get exceptions when I try to connect with SFTP
The exception will most likely be realted to DLLs. Try the following to understand why libssh2.dll
cannot be loaded:
- In the
libssh2_sftp
unit search for the line you see below and temporarily comment out thedelayed
keyword to disable the delayed loading of thelibssh2.dll
:function libssh2_sftp_init; external libssh2_name{$ifdef allow_delayed} delayed{$endif};
- Start your application. Without the
delayed
keyword the application will try to load the DLL on startup. In most cases this will give you another exception that points in the right direction. Try to look up what the code you get means.
For example:
When trying to load a 32-bit libssh2.dll for a 64-bit application, you get the following exception on connection:
And after removing the delayed keyword:
Looking up the code0xc000007b
you'll find answers mentioning a mix between 32-bit and 64-bit applications which immediately hints to incorrect DLL version usage.