2015-02-09 296 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

這可能會工作...