Hey all, I'm trying out Capistrano for my Amazon EC2 servers and am
having a little issue.

I am using the keys Amazon generates for the ec2 instances.  I am
running Capistrano on system 1 and trying to connect to system 2.  I
am not doing anything complicated yet, just trying to get connection
and am running through the getting started doc.

I have my private and public keys on my local system in .ssh/identity
(the amazon .pem file) and identity.pub (extracted from the .pem via
keygen).  I can then happily ssh via command line from system 1 to
system 2 without it asking for a password.

ssh r...@server2
bang, I'm in, all is well.

However, when I cap invoke COMMAND="echo 'Hello World'" or whatnot, it
asks for a password.  The keypair has no password.  If I just hit
"enter" it fails and I get the error:

connection failed for: server2 (Net::SSH::AuthenticationFailed: root)

Environment details: ruby 1.8.6, Capistrano v2.5.18.

capfile:
role :libs, "server2"
task :search_libs, :hosts => "server2" do
  run "ls -x1 /usr/lib | grep -i xml"
end

config/deploy.rb:
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "identity")]

Thoughts on what I'm doing wrong?  Thanks...

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to