Hello John, Sorry for delay in response and I tried the JCL you suggest for sftp transfer but getting below issue on job output
debug1: Authentications that can continue: publickey,password,keyboard-interacti debug1: Next authentication method: publickey debug1: Trying private key: /u/ibm08/.ssh/id_rsa debug1: Offering DSA public key: /u/ibm08/.ssh/id_dsa debug1: Authentications that can continue: publickey,password,keyboard-interacti debug1: Trying private key: /u/ibm08/.ssh/id_ecdsa debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interacti debug1: Next authentication method: password debug1: read_passphrase: can't open /dev/tty: EDC5128I No such device. (errno2=0 debug1: Authentications that can continue: publickey,password,keyboard-interacti FOTS1346 Permission denied, please try again. debug1: read_passphrase: can't open /dev/tty: EDC5128I No such device. (errno2=0 debug1: Authentications that can continue: publickey,password,keyboard-interacti FOTS1346 Permission denied, please try again. debug1: read_passphrase: can't open /dev/tty: EDC5128I No such device. (errno2=0 debug1: Authentications that can continue: publickey,password,keyboard-interacti debug1: No more authentication methods to try. FOTS1373 Permission denied (publickey,password,keyboard-interactive). debug1: zsshSmfSetConnSmfStatus: SMF status is 0 FOTS0841 Connection closed ... I tried to solve this key issue but no success so far. Please suggest. On Dec 1, 2016 19:17, "John McKown" <john.archie.mck...@gmail.com> wrote: > Damn it, forgot to make one change in the command stream. > > //JOBNAME JOB ACCT,NAME,CLASS=A,MSGCLASS=H, > // NOTIFY=&SYSUID > //SFTP EXEC PGM=IKJEFT01,REGION=0M > //SYSTSPRT DD SYSOUT=* > //SYSEXEC DD DISP=SHR,DSN=SYS1.SBPXEXEC (MAY BE DIFFERENT) > //SYSTSIN DD * > OPUT 'SOME.DATA.SET.NAME <http://some.data.set.name/>' '/tmp/ > SOME.FILE.NAME > <http://some.file.name/>' > OSHELL { echo 'password'; + > echo 'cd /tmp'; + > echo 'ascii'; + > echo 'put /tmp/SOME.FILE.NAME <http://some.file.name/>'; } | + > sftp -v use...@remote.ssh.server > /* > //* CHANGE password TO ACTUAL PASSWORD > //* CHANGE cd COMMAND TO ACTUAL REMOTE DIRECTORY > //* REMOVE ascii LINE FOR BINARY TRANSFER > //* CHANGE userid TO REMOTE USER'S ID > //* CHANGE remote.ssh.server TO ACTUAL DNS NAME/IP ADDR > //SCP EXEC PGM=IKJEFT01,REGION=0M > //SYSTSPRT DD SYSOUT=* > //SYSEXEC DD DISP=SHR,DSN=SYS1.SBPXEXEC (MAY BE DIFFERENT) > //SYSTSIN DD * > OPUT 'SOME.DATA.SET.NAME <http://some.data.set.name/>' '/tmp/ > SOME.FILE.NAME > <http://some.file.name/>' > OSHELL echo 'password' | + > scp /tmp/SOME.FILE.NAME <http://some.file.name/> + > use...@remote.ssh.server:- > /tmp/SOME.UNIXFILE.NAME <http://some.unixfile.name/> > /* > //* CHANGE password TO ACTUAL PASSWORD > //* CHANGE userid TO ACTUAL REMOTE USER ID > //* CHANGE remote.ssh.server TO ACTUAL DNS NAME/IP ADDR > //* !!!! CRITICAL !!!! > //* Note that scp command is spread over 3 lines due to > //* length of SYSTSIN input line. TSO will concatenate > //* them together into one logical line. IT IS CRITICAL > //* that you notice that I put the output file name > //* (/tmp/SOME.UNIXFILE.NAME <http://some.unixfile.name/>) on its own line > //* IT IS CRITICAL that this start in column 1. > //* IT IS ALSO CRITICAL that the previous line > //* end in a dash instead of a plus and that the dash > //* is _IMMEDIATELY_ after the colon. This is to > //* force TSO to concatenate all these characters together > //* without any spaces, which would destroy the UNIX > //* command line. > // > > > > -- > Heisenberg may have been here. > > Unicode: http://xkcd.com/1726/ > > Maranatha! <>< > John McKown > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN