> On Jun 1, 3:11 pm, ssmile73 <
ssmil...@hotmail.com> wrote:
>
> > Hi!
>
> > I'm new to cap. When I execute cap deploy:setup, i am seeingarcfour
> > error as:
> > [root]# cap deploy:setup
> > [DEPRECATION] Capistrano.configuration is deprecated. Use
> > Capistrano::Configuration.instance instead
> > * executing `deploy:setup'
> > * executing "umask 02 && mkdir -p /u/apps/<app> /u/apps/<app>/
> > releases /u/apps/<app>/shared /u/apps/<app>/shared/system /u/apps/
> > <app>/shared/log /u/apps/<app>/shared/pids"
> > servers: ["localhost"]
> > connection failed for: localhost (NotImplementedError: unsupported
> > encryption algorithm: `arcfour')
Hey ssmile73, I had the same problem on my "CentOS release 5 (Final)"
using ruby 1.8.6 and net-ssh 2.0.3
The problem is in net-ssh 2:
irb(main):001:0> require 'rubygems'
==> true
irb(main):002:0> require 'net/ssh'
==> true
irb(main):003:0> Net::SSH.start('
host.example.com', 'user') do | ssh |
irb(main):004:1* output = ssh.exec!("hostname")
end
NotImplementedError: unsupported encryption algorithm: `arcfour'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/algorithms.rb:192:in `prepare_preferred_algorithms!'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/algorithms.rb:185:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/algorithms.rb:185:in `prepare_preferred_algorithms!'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/algorithms.rb:96:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/session.rb:77:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh/transport/session.rb:77:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh.rb:182:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/
ssh.rb:182:in `start'
from (irb):3
When you look at line 192 in the algorithms.rb, it becomes clear that
net-ssh is raising an error because the options it's pulling out of
your default config files (~/.ssh/config, /etc/ssh_config, or /etc/ssh/
ssh_config) don't match what it expects. Specifically, one of your
config files has a line "Ciphers" which has 'arcfour' listed amongst
the available ciphers. The quickest way to get this working is to
comment '#' out the "Ciphers" line, or to remove the reference to
'arcfour' in it.
I'm still looking at the code, but I think if the developers of net-
ssh changed the line to skip if it can't understand the option instead
of raising an exception, that the module would still work, and you
could specify whatever ciphers you wanted for your command-line ssh
program without messing up your ruby net-ssh.
I hope you haven't been stuck on this for 2 months :(
HTH
--
donkeyfruit