Lionel B Dyck
Lionel B Dyck

Reputation: 696

Using BPXWUNIX to invoke sftp with a batch file - host not authenticating

Using this BPXWUNIX setup:

cmd is set as:  sftp -b /u/lbdyck/tmp/sftp.stdin [email protected]   

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??

Upvotes: 0

Views: 270

Answers (1)

Lionel B Dyck
Lionel B Dyck

Reputation: 696

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

//SFTP     EXEC PGM=BPXBATCH, 
// PARM=('sh sftp [email protected]') 
//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
/* 

Upvotes: 0

Related Questions