Focal Point
[SOLVED] SFTP in WebFOCUS

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5407094295

October 27, 2010, 04:13 PM
BobSh
[SOLVED] SFTP in WebFOCUS
We have a need to do a file transfer using SFTP. We've done FTP before. Has anyone done this before in a .fex? Would you be willing to share the code? This is actually for a Data Migrator program but I thought the same code would be applicable. Thanks.

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
October 27, 2010, 05:16 PM
Waz
Haven't done it, but should be easy.

Just check out the command, and its options, and take into account where the command is being executed from.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 27, 2010, 07:33 PM
BobSh
I got the sftp working from the UNIX script. Now I need to test the code in WF or Data Migrator. Thanks.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
October 27, 2010, 07:58 PM
Waz
Are you able to run it from either:

! {script}

or

-UNIX {script}

Make sure you add the path to the script, if it isn't in the loca directory or path.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 28, 2010, 03:01 AM
GamP
Is the sftp script different from the ftp script? If the only difference is using sftp iso ftp but everything else is the same then there may be an extra solution. Create a symbolic link to sftp called ftp. When you then call ftp, it will actually start sftp in stead.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 02, 2010, 11:51 AM
BobSh
Executing the sftp script works fine in UNIX but when calling it using !/home/bus/scripts/sftp_test.sh I get a "HOST KEY VERIFICATION FAILED" and the connection closes. I'm going to trace it next and if that doesn't help I'll open a case with IBI.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
November 02, 2010, 02:28 PM
BobSh
I got it working from the server now so all is OK. I actually needed to execute it from Data Migrator but there's no reason it shouldn't work in WebFOCUS also.
Thanks for your suggestions.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.