09:30
<robertberry>
Hey .. was wondering if I could get some help. Capistrano's giving me an obtuse error message
09:31
<robertberry>
basically in my ssh config I have the following:
09:31
<robertberry>
# Fatsoma Gateway
09:31
<robertberry>
Host gateway pg1.fatsomacloud.com
09:31
<robertberry>
HostName pg1.fatsomacloud.com
09:31
<robertberry>
Port 20522
09:31
<robertberry>
User trusted
09:31
<robertberry>
IdentityFile ~/.fatsoma/fatsoma_trusted.pg1
09:31
<robertberry>
# Fatsoma dev machine
09:31
<robertberry>
Host dev dw4.fatsomacloud.com
09:31
<robertberry>
HostName dw4.fatsomacloud.com
09:31
<robertberry>
User root
09:32
<robertberry>
IdentityFile ~/.identities/fatsoma_development.pem
09:32
<robertberry>
ForwardAgent yes
09:32
<robertberry>
and in my capfile I have this:
09:32
<robertberry>
set :gateway, "gateway"
09:32
<robertberry>
role :dev, "dw4.fatsomacloud.com"
09:32
<robertberry>
task :hostnames, roles => :dev do
09:32
<robertberry>
run "hostname"
09:32
<robertberry>
it's asking me for a pw though, and not using my key
09:32
<robertberry>
also if i try using the 'dev' hostname in my ssh config it doesn't work at all
09:32
<robertberry>
but spits out a load of gunk about an IOStream error
09:32
<robertberry>
any idea what I'm doing wrong? :(
09:33
<robertberry>
(that is it's asking for a pw for dev - it connects to gateway fine)
09:45
<robertberry>
don't suppose you know anything about connecting through gateways on Capistrano, Druid_?
09:46
<Druid_>
should be part of the network setup
09:46
<robertberry>
I've got everything set up in .ssh/config and it connects to the gateway fine but then doesn't seem to be able to use my key to connect to the internal machine
09:47
<robertberry>
(And also can't find it based on hostname aliases I put in config - indicating it's not getting that info at all for some reason)
09:47
<Druid_>
you should setup ssh agent
09:47
<Druid_>
http://unixwiz.net/techtips/ssh-agent-forwarding.html
09:47
<robertberry>
ta - will have a look
09:47
<Druid_>
read through that
10:12
<robertberry>
cheers, think I get it now. our sysadmin's set up a pretty nonsensical way of connecting through the gateway. instead of each internal computer having copies of our personal keys, there's whole new separate private keys for each server on the gateway machine. crazy! anyway, should be able to fix it now. thanks for your help!
10:14
<Druid_>
means no problem
10:45
<robertberry>
Hey sorry ... still having problems. I've got my public key on the gateway machine and on the internal machine. Each uses different users but both have the key in authorized_keys. I have the details of each set up in .ssh/config locally under the names 'gateway' for the gateway and 'dev' for the internal machine. ForwardAgent yes for both. However ...
10:45
<robertberry>
when I try to run the task I get this
10:46
<robertberry>
ruby-1.8.7-p357 robert@robert-laptop:~/fatsoma/fatcap$ cap hostnames
10:46
<robertberry>
* executing `hostnames'
10:46
<robertberry>
* executing "hostname"
10:46
<robertberry>
servers: ["dev"]
10:46
<robertberry>
* establishing connection to gateway `"gateway"'
10:46
<robertberry>
* Creating gateway using gateway
10:46
<robertberry>
* establishing connection to `dev' via gateway
10:46
<robertberry>
/home/robert/.rvm/gems/ruby-1.8.7-p357/gems/net-ssh-2.3.0/lib/net/ssh/ruby_compat.rb:36:in `select': closed stream (IOError)
10:46
<robertberry>
from /home/robert/.rvm/gems/ruby-1.8.7-p357/gems/net-ssh-2.3.0/lib/net/ssh/ruby_compat.rb:36:in `io_select'
10:46
<robertberry>
(then loads more in the traceback)
10:46
<robertberry>
any idea what'd cause it?
10:46
<robertberry>
if i specify the whole url for the machine it asks for a password and just ignores my key
10:46
<robertberry>
but it should be able to locate 'dev' from my local .ssh/config shouldn't it?
10:47
<robertberry>
or am i doing something wrong ..
11:41
<robertberry>
hmm well if anyone has any ideas please e-mail me at rjberry@gmail.com! spent the whole day trying to get it to work haha ...
11:42
<robertberry>
cheerio