使用BPXWUNIX调用批处理文件执行sftp – 主机未进行身份验证

huangapple go评论52阅读模式
英文:

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

问题

使用这个BPXWUNIX设置:

cmd被设置为:sftp -b /u/lbdyck/tmp/sftp.stdin userid@ftp.host.com

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

具有以下环境变量:

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

然后我得到了这个:

FOTS1370 主机密钥验证失败。
FOTS0841 连接关闭。

askpass文件是一个小型的Shell脚本,它执行用户密码的回显,因为我们无法交换密钥。

我已确认askpass文件具有700的权限。

想法/建议?

英文:

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

答案1

得分: 0

这似乎不起作用 - 但使用bpxbatch可以。

//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
/* 
英文:

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
/* 

huangapple
  • 本文由 发表于 2023年7月20日 22:38:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76730999.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定