2015-02-09 297 views
0

我写一个Ant脚本复制到本地Tomcat服务器上的文件(在根目录下),如下所示:“验证失败”(com.jcraft.jsch.JSchException)

<target name="temp"> 
    <scp todir="tomcat:[email protected]:8080"> 
      <fileset dir="C:\Users\akhilesh.kj\Desktop\Plugin"/> 
     </scp>  
</target> 

我有采用openSSH我的机器上。我不要有太多的想法如何works.when我运行上面的脚本,我得到“权威性失败” exception.I已经验证用户名和密码是correct.Below是日志:

  [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 

请帮帮我 !

谢谢。

回答

0

尝试

copy而不是scp

这可能会工作...