A pity. But at least I won't have to spend more time looking for the
solution, and can get back to tuning `nc` to close connections
automatically:
-q secs quit after EOF on stdin and delay of secs
I wonder if -q 0 will work? It is impossible to produce EOF
'character' on 'nc' stdin when Capistrano is still connected, isn't
it?
--
anatoly t.
On Fri, Mar 16, 2012 at 11:04 AM, Lee Hambley <[email protected]> wrote:
> That's not supported as far as I know Anatoly, sorry.
>
> On Friday, March 16, 2012 at 8:50 AM, anatoly techtonik wrote:
>
> Hello again,
>
> Gateway works just fine, but it seems that once gateway is set - it is
> impossible to escape it, which is not quite what I need. For instance
> with the config:
>
> set :gateway, { "gateway.example.com" => ["node", "node2"] }
>
> Running a command for 4 servers, where `www` and `www2` should be
> accessed directly, Capistrano still uses gateway (at least it reports
> so):
>
> * executing "pwd"
> servers: ["node", "node2", "www.example.com", "www2.example.com"]
> * establishing connection to gateway
> `{"gateway.example.com"=>["node", "node2"]}'
> * Creating multiple gateways using {"gateway.example.com"=>["node",
> "node2"]}
> * establishing connection to `node' via gateway
> * establishing connection to `node2' via gateway
> * establishing connection to `www.example.com' via gateway
> * establishing connection to `www2.example.com' via gateway
>
> --
> anatoly t.
>
>
>
> On Fri, Mar 16, 2012 at 4:45 AM, Rafa García <[email protected]>
> wrote:
>
> Hi Anatoly,
>
> Capistrano lets you set the gateway. Examples:
>
> Set a gateway for every connection
>
> set :gateway, "your.gateway.com"
>
> Set a chain of gateways with different users(foo and bar):
>
> set :gateway, ["[email protected]", "[email protected]"]
>
> Set the same chain of gateways with a hash:
>
>
> set :gateway, { ["[email protected]", "[email protected]"] =>
> :default} # default symbol indicates the gateway for every connection
>
>
> Set a chain of gateways which depends on servers with a hash (Servers
> host1 and host2 will go for your.gateway and host3 will use
> another.gateway.com):
>
>
> set :gateway, { "[email protected]" => [ "host1", "host2"],
> "[email protected]" => "host3" }
>
>
> Good night
>
> PS: I get the info reading the tests
> (test/configuration/connections_test.rb)
>
>
> 2012/3/15 anatoly techtonik <[email protected]>
>
>
> Thanks for reply. It appeared that the culprit is a SSH proxy command from
> .ssh/config that uses `nc` to get to nodes in local network through a
> gateway machine:
>
> Host node.localnet
> ProxyCommand ssh gateway.example.com exec nc %h %p
>
>
> Is it really necessary to use `nc` for this scenario? What is the common
> way to do this in Capistrano?
>
>
>
> On Tuesday, March 13, 2012 10:06:39 PM UTC+3, Lee Hambley wrote:
>
>
> Anatoly,
>
> This isn't normal, and must be a misconfiguration, or failed exit from
> Cap, I would kill those connections, and see if they come back. Also
> consider investing time in hiring someone who is experienced with server
> security, to make sure you haven't been breached, and it isn't someone
> having compromised your `deploy` user.
>
> - Lee
>
> On 13 March 2012 15:47, anatoly techtonik <[email protected]> wrote:
>
>
> Hi,
>
> I am new to Capistrano, and the script I use is not written by me.
> Is it ok for Capistrano to leave open SSH connections without TTY for
> several weeks?
>
> I observe about 20 open connections on deployment server. All from
> different users, who
> are not connected and have not used the server for a long time, except
> through
> automatic Capistrano deployment script.
>
> I suspect that Capistrano may leave them open in case of error during
> deployment.
> Can anybody confirm this? If that is the case - is it a bug or these
> sessions are useful
> for something (troubleshooting)?
>
> Thanks for answers. Hopefully, I didn't interrupt your beer drinking
> process. ;)
> --
> anatoly t.
>
>
> --
> * 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
>
>
>
> --
> * 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
>
>
> --
> * 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
>
>
> --
> * 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
--
* 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