Hi all,
I'd like to know the best way to make an SFTP file transfer through Wincc OA (3.17). From the documentation, what I understood was ctrl language doesn't have a function for SFTP. netGet(), and netPost() methods do not accept SFTP connection as a valid argument and doesn't accept the SFTP URL. So how can I implement a SFTP protocol through Wincc OA?
Best,
Eray
SFTP connection with Wincc OA
Search
-
- Posts: 161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: SFTP connection with Wincc OA
Not sure about it being the best way but you could try using an external SFTP software (like https://winscp.net) and access it via the system() function call in CONTROL.
Re: SFTP connection with Wincc OA
Maybe the right way is to mount the SFTP folder as a drive and WinCC OA could access to files with file functions.
There's lot of tools that able to mount a SFTP folder as a network drive.
There's lot of tools that able to mount a SFTP folder as a network drive.
Re: SFTP connection with Wincc OA
Thank you for the responses, I will look into winscp. Unfortunately, I don't think I can mount SFTP folder as a drive since SFTP server is deployed in customer's side. I only have to put and get files from there.
-
- Posts: 8
- Joined: Wed Jun 12, 2019 4:19 pm
Re: SFTP connection with Wincc OA
You can use the WINSCP api and calling it via System from control. You may have to do a bit of c# programming. I implemented a similar method to get images from my security system to show in OA. Drop me a message if i can help on this issue
here is a example to put in a batch file wich you can call via OA
this needs winscp installed on the source system
here is a example to put in a batch file wich you can call via OA
this needs winscp installed on the source system
Code: Select all
# Connect to SFTP server using a password
open sftp://user:password@example.com/ -hostkey="ssh-rsa 2048 xxxxxxxxxxx...="
# Upload file
put d:\examplefile.txt /home/user/
# Exit WinSCP
exit
-
- Posts: 373
- Joined: Tue Jan 15, 2019 3:12 pm
Re: SFTP connection with Wincc OA
You would mount the SFTP folder on your WinCC OA machine, so you can the standard file functions. No changes are needed on the SFTP server side.