Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 94986 invoked from network); 9 May 2006 17:00:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 May 2006 17:00:43 -0000 Received: (qmail 86130 invoked by uid 500); 9 May 2006 17:00:36 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 86086 invoked by uid 500); 9 May 2006 17:00:36 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 86075 invoked by uid 99); 9 May 2006 17:00:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2006 10:00:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of atsuhiko.yamanaka@gmail.com designates 64.233.162.204 as permitted sender) Received: from [64.233.162.204] (HELO nz-out-0102.google.com) (64.233.162.204) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 May 2006 10:00:34 -0700 Received: by nz-out-0102.google.com with SMTP id n29so1389079nzf for ; Tue, 09 May 2006 10:00:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Trp4J7gQnetVnOVhmerVJktsbm/xQ63pWRg/romELlRciDti5+ezVblN1h24sf67w1cfU6nw0PYo82k64Nbl3Zfvw9F3z1650GAUheQTfxl8QO8UFqvImFbrzF2XdpWqspvGhsJn27v6Bt8ZwmLGCHxuwcx0E0xQUgCwjcToIZU= Received: by 10.64.180.14 with SMTP id c14mr1761192qbf; Tue, 09 May 2006 10:00:12 -0700 (PDT) Received: by 10.65.189.8 with HTTP; Tue, 9 May 2006 10:00:12 -0700 (PDT) Message-ID: <6df22f8a0605091000kc6fbe14qbec3553a0ef762c0@mail.gmail.com> Date: Wed, 10 May 2006 02:00:12 +0900 From: "Atsuhiko Yamanaka" Sender: atsuhiko.yamanaka@gmail.com To: "Ant Users List" Subject: Re: ANT SCP Via a Java App In-Reply-To: <020D3A27041DDC4E8E4F4D4FD290ABE9637784@COOMBE.ad.davy.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <020D3A27041DDC4E8E4F4D4FD290ABE9637784@COOMBE.ad.davy.ie> X-Google-Sender-Auth: 3c313ea468c67223 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, 2006/5/9, Gareth Kelly : > Works fine when passing in username and password. > I set up a trusted connection by creating a public/private key pair and > appending the identity.pub to the remote authorized_keys. The internal ssh client can not understand ssh1 public/private key. So, generate key pair by "ssh-keygen -t rsa" or "ssh-keygen -t dsa" and you will have key-pair like "id_dsa, id_dsa.pub" or "id_rsa,id_rsa.pub". And, you have to set its private key explicitly with setKeyfile method. > Scp scpConnection =3D new Scp(); > Project project =3D new Project(); > scpConnection.setFile(aSFile); scpConnection.setKeyfile("/home/nettrade/.ssh/id_dsa"); then, you must set something as a passphrase even if it is not encrypted, because there is a bug. scpConnection.setPassphrase(""); > scpConnection.setTrust(true); > scpConnection.setTodir("nettrade@laois > :" + aSDir); > scpConnection.setProject(project); > scpConnection.execute(); Dear developers, to resolve above bug, following lines in=20 org/apache/tools/ant/taskdefs/optional/ssh/Scp.java if (getUserInfo().getPassword() =3D=3D null && getUserInfo().getPassphrase() =3D=3D null) { throw new BuildException("neither password nor passphrase for u= ser" + getUserInfo().getName() + " has been= " + "given. Can't authenticate."); } should be if (getUserInfo().getPassword() =3D=3D null && (getUserInfo().getPassphrase() =3D=3D null && getUserInfo().getKeyfile()=3D=3Dnull)) { throw new BuildException("neither password nor passphrase for u= ser" + getUserInfo().getName() + " has been= " + "given. Can't authenticate."); } --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org