ibm midrange - Example SFTP batch upload script for AS400 server to upload to a Unix SFTP server -


Suppose I have a file named AS 400, helloworld.txt and I want to write a script to upload it daily. To upload to a UNIX SFTP server, source file on an AS 400 server is called helloworld.txt, sftp: //exampleunixsftp.com?

Is anyone having such a script? Is OpenSSH the only tool that can be used on AS 400 so that it can be completed or is there any other way? If Lftp can be installed on AS 400, this would be an easy solution, but since it is only for Unix / Linux / Win / Mac, I do not have this option. I have read Scott Clement's article here:

I just need a basic script to do this. I appreciate it.

There are some information and examples on the subject of the MidnightWeek that can be useful. / P>

sftp is primarily targeted as an interactive utility scp executes the same function non-reciprocally.

The command, once the authentication is set up, will be:

  scp helloworld.txt Username@exampleunixsftp.com: & lt; Destination path & gt;   

LFTP can be installed in the PASE environment with some preparation. Use offline now.

Comments