I'm pretty sure they're in the right place at least... All Linux (though
putty has touched the keys), everything running as root.  File layout and
perms:

[r...@domu-12-31-39-00-69-44 ~]# cd /root; ls -alRt
.:
total 44
drwx------  2 root root 4096 May 18 17:26 .ssh
dr-xr-x---  4 root root 4096 May 18 17:23 .
-rw-r--r--  1 root root  195 May 18 17:22 capfile
-rw-------  1 root root 4261 May 18 16:06 .bash_history
drwxr-xr-x  3 root root 4096 May 18 12:51 .gem
-rw-r--r--  1 root root  160 May 18 12:51 .gemrc
dr-xr-xr-x 23 root root 4096 May 18 12:11 ..
-rw-r--r--  1 root root   24 Feb 22  2008 .bash_logout
-rw-r--r--  1 root root  327 Feb 22  2008 .bash_profile
-rw-r--r--  1 root root  184 Dec 11  2007 .bashrc

./.ssh:
total 24
drwx------ 2 root root 4096 May 18 17:26 .
-rw-r--r-- 1 root root   55 May 18 17:26 config
dr-xr-x--- 4 root root 4096 May 18 17:23 ..
-rw------- 1 root root 1312 May 18 15:20 known_hosts
-rw------- 1 root root 1693 May 18 14:22 identity
-rw------- 1 root root  791 Mar 22 18:06 authorized_keys

I got it working, but here's what I had to do.  I deleted the user line
from the capfile, deleted the deploy.rb, and added a .ssh/config to specify

host *.compute-1.internal
IdentityFile ~/.ssh/identity

But that's kind of a bummer because I have a couple different key files I
want to use on different groups of like 100 boxes.

If I dump a second key3.pem file for another set of boxes in /root, I can
ssh to server3 which uses that key thus:

 ssh -i key3.pem server3

But trying to cap it, if I add my deploy.rb back and put

ssh_options[:keys] = [File.join(ENV["HOME"], "key3.pem")]

and try to do stuff to server3 by adding it as a role, same problem.
(server2 still works, since it's the magic "identity" .pem).

Basically ssh is working as one would expect (using .ssh/identity and/or -i
and/or config lines) but it doesn't seem like I can specify any of that in
capistrano and have it work.

Ernest
______________________
UN-altered REPRODUCTION and DISSEMINATION of
this IMPORTANT information is ENCOURAGED.



                                                                                
                                                
  From:       Lee Hambley <[email protected]>                               
                                                
                                                                                
                                                
  To:         [email protected]                                       
                                                
                                                                                
                                                
  Date:       05/18/2010 04:21 PM                                               
                                                
                                                                                
                                                
  Subject:    Re: [capistrano] New Capistrano user, having SSH problem asking 
for     password                                  
                                                                                
                                                
  Sent by:    [email protected]                                       
                                                
                                                                                
                                                





Sorry, I missed that you'd shown the error there -
      Are your identity files in the correct place, and with the standard
      names?
      Are you running the script as your own using
      Windows or linux (client machine?)
      If Windows – are you using putty agent
      If Linux, any strange config we should know about?
- Lee


--
* 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 capistrano
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en




-- 
* 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