美文网首页
Ant com.jcraft.jsch.JSchExceptio

Ant com.jcraft.jsch.JSchExceptio

作者: else05 | 来源:发表于2016-10-16 16:59 被阅读999次

ant使用JSCH.jar插件时,执行scp上传或者sshexec时报错com.jcraft.jsch.JSchException: reject HostKey
原因是主机信任问题,设置trust="true"则信任所有主机

// 增加trust="true"参数  ,sshexec 同理
<scp file="${dist.dir}/${war.file}" todir="${deploy.username}:${deploy.password}@${deploy.server}:${deploy.dir}" trust="true"/>
  • 报错


    Paste_Image.png
  • 官方文档


    Paste_Image.png
参考

相关文章

网友评论

      本文标题:Ant com.jcraft.jsch.JSchExceptio

      本文链接:https://www.haomeiwen.com/subject/tktayttx.html