Re: [capistrano] How to limit the number of SSH channels that can be open

179 views
Skip to first unread message

Lee Hambley

unread,
May 18, 2010, 7:12:49 PM5/18/10
to capis...@googlegroups.com
Ronie,

I'm not sure this is possible (but I could take a look) - do you have a specific problem with the existing implementation?

- Lee

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

Rafael G.

unread,
May 18, 2010, 9:04:57 PM5/18/10
to capis...@googlegroups.com
El 18/05/10 16:58, Ronie Gilberto Henrich escribió:
> Hi,
>
> Is it possible to configure capistrano to limit the number of SSH
> channels that can be open to 1, so it does not use ssh connection
> multiplexing?
>
> Thanks,
> Ronie

Hi Ronie,

I guess you can use max_hosts option.

For example:

task :foo, :max_hosts => 1 do
#do some stuff
end

Good night


--
Rafa

Ronie Gilberto Henrich

unread,
May 18, 2010, 4:58:49 PM5/18/10
to capis...@googlegroups.com
Hi,

Is it possible to configure capistrano to limit the number of SSH channels that can be open to 1, so it does not use ssh connection multiplexing?

Thanks,
Ronie

Ronie Gilberto Henrich

unread,
May 18, 2010, 10:35:03 PM5/18/10
to capis...@googlegroups.com
Hi Lee,

Our servers have OpenSSH with maxsessions=1 for security purposes. But capistrano does not work when maxsessions=1.

Thanks,
Ronie

Ronie Gilberto Henrich

unread,
May 18, 2010, 10:38:56 PM5/18/10
to capis...@googlegroups.com
Hi Rafael,

max_hosts just limit the number of hosts, not the number of ssh channels per connection.


Thanks,
Ronie

Rafael G.

unread,
May 19, 2010, 8:47:12 AM5/19/10
to capis...@googlegroups.com
El 18/05/10 22:38, Ronie Gilberto Henrich escribió:
> Hi Rafael,
>
> max_hosts just limit the number of hosts, not the number of ssh channels per connection.
>
>
> Thanks,
> Ronie
>
>
Ok, I don't understood. I will see for it later.

--
Rafa

Rafael G.

unread,
May 20, 2010, 7:06:29 PM5/20/10
to capis...@googlegroups.com
El 18/05/10 22:38, Ronie Gilberto Henrich escribió:
> Hi Rafael,
>
> max_hosts just limit the number of hosts, not the number of ssh channels per connection.
>
>
> Thanks,
> Ronie
>
>
I'm seeing the code in capistrano/lib/capistrano/ssh.rb and said at line 35:

# If an :ssh_options key exists in +options+, it is passed to the
Net::SSH
# constructor.

It means that you can do things like this:

set :ssh_options, { :forward_agent => true }

Well, If you read Net::SSH::start[1] method you can see all the options
that accept. I guess the ":properties" parameters is that you need(the
help send you to Net:SSH::Session#properties to see what support), but I
don't find any reference about it.

Maybe, you should ask to net-ssh maintainer.

Regards




[1] http://net-ssh.rubyforge.org/ssh/v2/api/classes/Net/SSH.html#M000013

--
Rafa
Reply all
Reply to author
Forward
0 new messages