gpt4 book ai didi

sftp - 使用 sftp -b 批处理文件的权限被拒绝

转载 作者:行者123 更新时间:2023-12-01 06:05:15 26 4
gpt4 key购买 nike

我可以使用 ssh/sftp(不带 -b 选项)登录我的 Remote

sftp root@192.168.7.2

但是当我尝试
sftp -b commands.tmp root@192.168.7.2

我得到
Permission denied (publickey,password).
Couldn't read packet: Connection reset by peer

Commands.tmp 看起来像这样
ls
exit

我在这里缺少什么吗?

最佳答案

我使用 shhpass 写密码没有交互,我需要添加 -oBatchMode=no

sshpass -p PASSWORD sftp -v -oBatchMode=no -b FILE USER@SERVER

关于sftp - 使用 sftp -b 批处理文件的权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16657015/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com