gpt4 book ai didi

java - "Auth fail"(com.jcraft.jsch.JSchException)

转载 作者:行者123 更新时间:2023-11-28 23:32:35 30 4
gpt4 key购买 nike

我已经编写了一个 ant 脚本来复制本地 tomcat 服务器(在根目录中)上的文件,如下所示:

<target name="temp">
<scp todir="tomcat:tomcat@localhost:8080">
<fileset dir="C:\Users\akhilesh.kj\Desktop\Plugin"/>
</scp>
</target>

我的机器上有 openSSH。我不太清楚它是如何工作的。当我运行上面的脚本时,出现“auth fail”异常。我已验证用户名和密码正确。下面是日志:

         [scp] Connecting to localhost:22
[scp] Connecting to localhost port 22
[scp] Connection established
[scp] Remote version string: SSH-2.0-OpenSSH_3.8.1p1
[scp] Local version string: SSH-2.0-JSCH-0.1.42
[scp] CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[scp] SSH_MSG_KEXINIT sent
[scp] SSH_MSG_KEXINIT received
[scp] kex: server->client aes128-ctr hmac-md5 none
[scp] kex: client->server aes128-ctr hmac-md5 none
[scp] SSH_MSG_KEXDH_INIT sent
[scp] expecting SSH_MSG_KEXDH_REPLY
[scp] ssh_rsa_verify: signature true
[scp] Permanently added 'localhost' (RSA) to the list of known hosts.
[scp] SSH_MSG_NEWKEYS sent
[scp] SSH_MSG_NEWKEYS received
[scp] SSH_MSG_SERVICE_REQUEST sent
[scp] SSH_MSG_SERVICE_ACCEPT received
[scp] Authentications that can continue: publickey,keyboard-interactive,password
[scp] Next authentication method: publickey
[scp] Authentications that can continue: keyboard-interactive,password
[scp] Next authentication method: keyboard-interactive
[scp] Authentications that can continue: password
[scp] Next authentication method: password
[scp] Disconnecting from localhost port 22
com.jcraft.jsch.JSchException: Auth fail

请帮忙!

谢谢。

最佳答案

尝试

copy 而不是 scp

这可能有用...

关于java - "Auth fail"(com.jcraft.jsch.JSchException),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28406191/

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