SFTP with user and password with libssh2
Daniel Nashed – 13 December 2025 18:09:09
Here is the challenge
lftp and curl compiled in the right way, support SFTP with user/password required for HCL ticket uploads.
As explained earlier UBI does have an easy path to support SFTP with user/password.
The mission is to have SFTP support without new dependencies
I took another look of what options we have without introducing a new dependency to the container image.
Here is the idea: libssh2 is easy to use and supports user/password (https://github.com/libssh2/libssh2).
nshmailx is already a C/C++ application which statically links OpenSSL on Alpine. The same works also for libssh2.
Here is the new code I just added -> https://github.com/nashcom/nshmailx/blob/main/sftp.cpp
I am still testing it. But here are the new options for SFTP Put -> https://github.com/nashcom/nshmailx/
Now I am waiting for HCL support to explain how the flow works to get a user/password for upload along with the ticket number (https://support.hcl-software.com/csm?id=kb_article&sysparm_article=KB0010064).
The idea is to integrate the upload into the Domino diagnostic script.
Update: OK added a performance counter, checksum support for get/put. a larger buffer of 1 MB brings better performance.
- Comments [0]