I’m new to cap. When I execute cap deploy:setup, i am seeing arcfour
error as:
[root]# cap deploy:setup
[DEPRECATION] Capistrano.configuration is deprecated. Use
Capistrano::Configuration.instance instead
More information - when cap is attempting to connect net-ssh used is
different for local and remote (wierd since both local and remote are
the same system).
Here it is:
[root]# cap deploy:setup
[DEPRECATION] Capistrano.configuration is deprecated. Use
Capistrano::Configuration.instance instead
executing `deploy:setup’
executing "umask 02 && mkdir -
servers: [“uhostname”]
D, [2008-06-01T23:12:12.009131 #17527] DEBUG –
net.ssh.transport.session[…fdbfb7c00]: establishing connection to
uhostname:22
D, [2008-06-01T23:12:12.024022 #17527] DEBUG –
net.ssh.transport.session[…fdbfb7c00]: connection established
I, [2008-06-01T23:12:12.024328 #17527] INFO –
net.ssh.transport.server_version[…fdbf3b1b0]: negotiating protocol
version
D, [2008-06-01T23:12:12.024466 #17527] DEBUG –
net.ssh.transport.server_version[…fdbf3b1b0]: remote is SSH-2.0-
OpenSSH_3.9p1
D, [2008-06-01T23:12:12.024543 #17527] DEBUG –
net.ssh.transport.server_version[…fdbf3b1b0]: local is SSH-2.0-Ruby/
Net::SSH_2.0.2 i386-linux
connection failed for: uhostname(NotImplementedError: unsupported
encryption algorithm: `arcfour’)
Why is the net.ssh.transport server_version different for local and
remote although both remote and local are the same system? How can I
ensure that the remote system also uses the same net-ssh (both local
and remote are physically the same box)
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.