Agreed, SSH stuff is probably the creepiest stuff to set up. Once figured out works pretty well though. The problem I think is that instructions are pretty much dependent on the exact combination of server/client ssh stuff you run. Here is what worked for me with pointers where your actions might diverge:
1. Create a pair of keys public/private on your server that you are trying to connect to. Tell your key generating program to set a passphrase (say yours is secret). A pitfall I got caught up in this step, is that I was trying to generate the keys on one server while trying to connect to another. Well not all keys are created equals as it turned out, so try to be consistent. 2. Grab your private key and move it to the development/automation box from where you are going to do the deployments. You can place it in ${source.box.user.home}/.ssh. Say we generate RSA key and the file the generating script generates is named id_rsa. So you will have ${source.box.user.home}/.ssh/id_rsa 3. Place your public key in the directory where your SSH server will actually find it. You might need to dig the SSH's docs to see where it is. In my case I assumed it was in ${target.box.user.home}/.ssh directory while the server, our admin runs, actually looks for the file in ${target.box.user.home}/.ssh2. So make sure you are placing your public key to where it matters. 4. Now configure your project to use SCP, using your private key and a passphrase to connect to the target server. Place the following lines in project.properties: maven.repo.R1=scp://my.target.server.com maven.repo.R1.directory=/my/deployment/dir/on/target/server maven.repo.R1.group=<group to set on files copied to the target server> maven.repo.R1.compress=false maven.repo.R1.privatekey=${source.box.user.home}/.ssh/id_rsa In your ${source.box.user.home}/build.properties files specify the following maven.repo.R1.username=<username> maven.repo.R1.passphrase=secret One more pitfall to avoid is to make sure that the user with <username> connecting to the remote server has the rights to create/copy/move/chgrp on the remote server. Now you are ready to run your deploy commands. I am not sure if there is any difference between site:deploy or jar:deploy accept for the fact -----Original Message----- From: Sébastien Arbogast [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 9:53 AM To: users@maven.apache.org Subject: [MavenBook] Using a public/private key scheme for site deployment Hi, First of all I'd like to thank and congratulate Vincent Massol and Tim O'Brien for this excellent book I'm reading right now (Maven, A Developer's Notebook). It's really excellent and enables me to use Maven at full capacity. But I have a problem with one of the tips concerning site deployment (Chapter 4, page 124) which recommends to use a public/private key scheme for SSH when deploying the site. The problem is that I've just installed Cygwin and it's OpenSSH port on my windows box, but I don't know how to configure it to use that scheme. It works great using password for artifact deployment, but for site deployment, it hangs because of authentication failure. I'm aware of the fact that this question may be a little off topic, but as it deals with a book about Maven, someone who has already solved that issue could give me a link to a tutorial or give me a few guidelines here. Why not a tip that could be added to MavenBook website...? Thanks in advance. -- Sébastien Arbogast The Epseelon Project : http://www.epseelon.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]