[Anthill] SCP
Misura, Gabe
gabe.misura at eds.com
Thu Nov 25 14:20:17 CST 2004
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-passwds.html
_______________________________________________
Anthill mailing list
Anthill at lists.urbancode.com
http://lists.urbancode.com/mailman/listinfo/anthill
More information about the Anthill
mailing list