[Anthill] SCP

Tim Colson tcolson at cisco.com
Mon Dec 6 10:22:58 CST 2004


Gabe --

Sorry for the long delay, busy and out of town for a while.

I'm not sure what's going on with the ArrayIndex out of bounds. 

Looks like you've got SSH2, whereas I seem to have SSH1.

Some info on making the two play together is here, might help you sort out
what needs to change to make SSH2 work.
http://web.yl.is.s.u-tokyo.ac.jp/~ymmt/ssh2.html

This ref walks through most of what I did to enable remote login...which is
how the Ant tasks works.

http://vh224401.truman.edu/~dbindner/guide/a2076.html

Essentially, if you can set things up so YOU can login without giving a
password (just the key) ... then ANT should work too. :-)

Hope that helps,
Timo


> -----Original Message-----
> From: anthill-bounces at caladin.urbancode.com 
> [mailto:anthill-bounces at caladin.urbancode.com] On Behalf Of 
> Misura, Gabe
> Sent: Thursday, November 25, 2004 1:20 PM
> To: Anthill user list
> Subject: RE: [Anthill] SCP
> 
> Tim/All,
> 
> Thanks for the info.
> I tried that and got this error:
> 
> preprod:
>       [scp] Identity: java.lang.ArrayIndexOutOfBoundsException: 8
> 
> BUILD FAILED
> D:\WSAD\Anthill\work\fakeinfoconlogin\WebContent\WEB-INF\build.xml:71:
> com.jcraft.jsch.JSchException: 
> java.lang.ArrayIndexOutOfBoundsException: 8
> 
> Probably because I didn't understand the step "create/append
> {home}/.ssh/id_ra.pub into authorized_keys2". 
> On my system I don't have "id_ra.pub", something close though:
> bash-2.03$ ls ~/.ssh2/
> id_rsa_2048_a      id_rsa_2048_a.pub  random_seed
> 
> And there is no authorized_keys2 file on the system:
> bash-2.03$ find / -name authorized_keys2 2>/dev/null
> bash-2.03$
> 
> However, I grabbed the is_rsa_2048_a and pointed ant to that:
> 		<scp todir="user at 1xx.1xx.8x.7:/dir/dir/dir/dir"
> 			 trust="Yes"
> 			 verbose="Yes"
> 			 passphrase=""
> 	
> keyFile="D:/WSAD/Anthill/lib/ant-1.6.2/keys/id_rsa_2048_a" >
> 			 <fileset file="${warpath}/${warfile}.war"/>
> 		</scp>
> That gave me the error above. I also tried the .pub file, and I got
> preprod:
>       [scp] Connecting to 129.124.87.7:22
> 
> BUILD FAILED
> D:\WSAD\Anthill\work\fakeinfoconlogin\WebContent\WEB-INF\build.xml:71:
> com.jcraft.jsch.JSchException: Auth cancel
> 
> Any other ideas? Thanks
> 
> 
> Gabriel Misura
> 500 Renaissance Center, MS 15th Floor, 1340
> Detroit, MI 48243
> Phone: 313-230-6119
> AIM: gabemisura
> 
> The information in this email is confidential and may be 
> legally privileged.
> It is intended solely for the addressee. Access to this email 
> by anyone else
> is unauthorized. If you are not the intended recipient, any 
> disclosure,
> copying, distribution or any action taken or omitted to be 
> taken in reliance
> on it, is prohibited and may be unlawful.
> 
> 
> -----Original Message-----
> From: anthill-bounces at caladin.urbancode.com
> [mailto:anthill-bounces at caladin.urbancode.com] On Behalf Of Tim Colson
> Sent: Tuesday, November 23, 2004 8:01 PM
> To: 'Anthill user list'
> Subject: RE: [Anthill] SCP
> 
> 
> I use SCP tasks, but instead of embedding the password, I'm 
> using keys. 
> 
> This task and info below might be helpful to you, but if not, 
> no guarantee
> implied. <grin>
> 
>  <scp   
>    file="${project.dist.dir}/${project.id}.war"
>    toDir="userid at servername:${deploydir}"
>    passphrase="" trust="true" 
>    keyFile="C:/ssh/id_rsa"/>
> 
> Quick notes:
> 
>     * Login to servername
>     * generate pub/private key pair using "ssh-keygen -t rsa"
>           o PuTTY? folks point out a problem with DSA keys and highly
> recommend RSA keys
>           o do not add a passphrase, just hit enter
>     * create/append {home}/.ssh/id_rsa.pub into authorized_keys2
>     * copy id_rsa (the private key) to C:/ssh/ on the client computer
>     * Add JSCH library to ANT_HOME/lib from 
> http://www.jcraft.com/jsch/
>     * run ant SCP/SSHEXEC tasks, using the priv key file
> 
> Putty notes:
>     * The private key can also be 'converted' using puttygen 
> into readble
> putty key
>     * Add the converted key into putty (Connection-SSH-Auth)
>     * change the preferred SSH proto for the session to be "2"
>     * move the Blowfish cipher to the top of the list
>     * Login will prompt for userid, but no password
>     * Create a shortcut to "C:\WINDOWS\putty.exe -l -load and no
> userid/password req'd! Cool.
> 
> Resources: A page on creating the keyset -- using 
> puttygen.exe on windows:
> http://homepages.borland.com/ccalvert/linux/utils/sshDocs.html
> 
> UNIX - Setting up Passwordless UNIX Login
> http://helpdesk.cs.tamu.edu/docs/unix_Passwordless_Login
> 
> SSH without passwords
> http://nf.apac.edu.au/facilities/software/SSH/ssh-without-pass
> wds.html 
> 
> _______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill
> _______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill
> 




More information about the Anthill mailing list