0

Using this BPXWUNIX setup:

cmd is set as:  sftp -b /u/lbdyck/tmp/sftp.stdin userid@ftp.host.com   

x = bpxwunix(cmd,,so.,se.,env.)

With an environment variable of:

 DISPLAY=NONE                              
 SSH_ASKPASS=/u/lbdyck/.ssh/sftp.sftpsh    

And I get this:

FOTS1370 Host key verification failed.:                           
FOTS0841 Connection closed: 

The askpass file is a small shell script that does an echo of the users password since we're unable to exchange keys.

I have confirmed that the askpass file has permissions of 700.

Thoughts/suggestions??

Lionel B Dyck
  • 552
  • 2
  • 9
  • You write "with **an** environment variable", but you show two of them. Did you assign them to `env.1`, and `env.2`, resp. and have you set `env.0=2`? – phunsoft Jul 22 '23 at 20:40
  • yes - i set env.1, env.2 and env.0 – Lionel B Dyck Jul 24 '23 at 14:27
  • You don't show how you invoke `bpxwunix`. Can you edit your Q and add the whole REXX, and how you start the REXX, i.e. from TSO session, in a bacth job, from a UNIX shell, other? – phunsoft Jul 24 '23 at 17:29

1 Answers1

0

This does not appear to work - but using bpxbatch does.

//SFTP     EXEC PGM=BPXBATCH, 
// PARM=('sh sftp support@ftp.support.com') 
//STDOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=* 
//STDIN    DD PATH='/u/user/sftp_input.txt' 
//STDERR   DD SYSOUT=* 
//STDENV   DD * 
DISPLAY=NONE
SSH_ASKPASS=/u/userid/.ssh/sftp_test.sh
/* 
phunsoft
  • 2,674
  • 1
  • 11
  • 22
Lionel B Dyck
  • 552
  • 2
  • 9
  • Would you add more details of how `bpxbatch` is called, i.e. the batch JCL, the REXX, other? – phunsoft Jul 24 '23 at 17:30
  • Thanks. I have copied the sample job to the Q. You might want do delete the obsolete comment. Would you mind to add to the Q above how `bpxwunix` was called? – phunsoft Jul 26 '23 at 09:18