SFTP connection with Wincc OA

Discussion about recent product features & solutions!
Search

Post Reply
6 posts • Page 1 of 1
eraytufan
Posts: 9
Joined: Tue Sep 03, 2019 9:19 am

SFTP connection with Wincc OA

Post by eraytufan »

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

dbindernagel
Posts: 161
Joined: Mon Feb 23, 2015 1:34 pm

Re: SFTP connection with Wincc OA

Post by dbindernagel »

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.

User avatar
amichon
Posts: 93
Joined: Sat May 17, 2014 3:49 pm

Re: SFTP connection with Wincc OA

Post by amichon »

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.

eraytufan
Posts: 9
Joined: Tue Sep 03, 2019 9:19 am

Re: SFTP connection with Wincc OA

Post by eraytufan »

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.

c.fraenzer
Posts: 8
Joined: Wed Jun 12, 2019 4:19 pm

Re: SFTP connection with Wincc OA

Post by c.fraenzer »

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


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

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: SFTP connection with Wincc OA

Post by gschijndel »

eraytufan wrote: Thu Jul 09, 2020 3:35 pm 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.

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.

Post Reply
6 posts • Page 1 of 1