Upload csv files towards a SFTP server

Used controller: AXC F 2152 Which possibilities do we have for uploading files towards a SFTP server? The source file is stored locally on the PLC.

                                             * The IT library for PLCnext Engineer only supports FTP
                                             * The PLCnext Base library for PLCnext Engineer only supports FTP
                                             * Curl only supports FTP out of the box

Is there a way to extend curl with SFTP functionality? (like described here: https://www.techrepublic.com/article/how-to-build-curl-with-sftp-support/) Any other possibility?

Hi Sven, sftp is installed with FW 2020.6.1, at least:

[](mailto:admin@axcf2152:/opt/plcnext$)admin@axcf2152:/opt/plcnext$ sftp  
> usage: sftp [-46aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]  
>  [-D sftp_server_path] [-F ssh_config] [-i identity_file]  
>  [-J destination] [-l limit] [-o ssh_option] [-P port]  
>  [-R num_requests] [-S program] [-s subsystem | sftp_server]  
>  destination  
> [](mailto:admin@axcf2152:/opt/plcnext$)admin@axcf2152:/opt/plcnext$

… so you could try this with the Shell FB from the PLCnextBase library? ~ Martin.

Hey Sven,

a little outdated but surely this can be adapted to the latest PLCnext FW.
Just be sure to checkout the versions of curl that are also used in the FW. (binary compatibility…)

https://www.plcnext-community.net/en/hn-makers-blog/254-crosscompile-guide-curl-library-for-ftp-smtp.html

if you do not need the libcurl.

You can use SCP as well if you want to upload or download. or like martin suggests sftp…
kind regards,
Oliver