Audit logging with QSHELL/STRQSH CMD('/QOpenSys/bin/sftp -v -b YourSFTPscriptFile.txt -o IdentityFile=~/.ssh/id_rsa AllowedUser@xxxxxxxxxx > /IFSFolder/YourLogFile.log 2>&1 ')
subcommand LS -lt may have a parameter allowing you to direct the LS output to some IFS location.
https://www.ibm.com/docs/en/search/SSH?scope=ssw_ibm_i_75

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of DEnglander--- via MIDRANGE-L
Sent: Tuesday, November 29, 2022 1:17 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: DEnglander@xxxxxxxxxxxxxxx
Subject: [External] SFTP examples

[WARNING]: External Email

Does anyone have an example (or know of a URL where I can find an example) of using SFTP?

I need to have SFTP executed in a CL [or RPG] program that is submitted to Batch. That program will need to sign on to the remote SFTP server, execute the LS command on a specific folder, and then place the contents of the LS command into a file on the IFS.

My credentials are correct because I have another SFTP process that sends our IFS files to the same remote server, and it works fine [it does not create any logging/listing file but I would like it to]. I would like to capture the whole back and forth session between the two systems, and most importantly, the contents of the folder.

Any ideas?

Thank you,

Doug

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.