Classification: Confidential There are a number of hacks that obscure the password in SFTP batch. The easiest and best method I have come across are public/private keypairs
The keypairs may be stored in your ESM, or in the Unix File System. I heartily recommend CoZ:SFTP Toolkit (WWW.DOVETAIL.COM) . Free to use, $$$ for support. The major enhancement over IBM "vanilla" SFTP is support for z/OS datasets. "Vanilla SFTP" from IBM does not do this. There is far more to be discussed, if you decide t o go down this road, HTH, -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Billy Ashton Sent: Friday, October 8, 2021 3:19 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Passing user/pw in to BPXBATCH SFTP [CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.] Hi all! I see we have been talking some about FTPS, so now I want to spin the letters around for SFTP with an easy question-I hope! Does anyone have a batch job/JCL that they use for SFTP that hides a user/password? I have looked for some hours at Google, and everything I see has the user and password in clear text. I am looking for something like the NETRC file, or some other method you folks use for running SFTP in BPXBATCH. Also, I could be running up against the line limit for a single line SFTP command with my different options (I am specifying particular ciphers), and wonder if there is a way to make SFTP a multi-line command. Thanks for all your help! Billy ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ::DISCLAIMER:: ________________________________ The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. ________________________________ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN