# Error in deploy:setup concerning arcfour

**URL:** <https://www.ruby-forum.com/t/error-in-deploy-setup-concerning-arcfour/139217>\
**Category:** Deployment\
**Created:** [June 2, 2008, 12:12am UTC](https://www.ruby-forum.com/t/error-in-deploy-setup-concerning-arcfour/139217 "2008-06-02T00:12:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssmile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@ssmile](https://www.ruby-forum.com/u/ssmile)\
**Post date:** [June 2, 2008, 12:12am UTC](https://www.ruby-forum.com/t/error-in-deploy-setup-concerning-arcfour/139217/1 "2008-06-02T00:12:30Z")

</div>

Hi!

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

- executing `deploy:setup’
- executing “umask 02 && mkdir -p /u/apps/ /u/apps//  
releases /u/apps//shared /u/apps//shared/system /u/apps/  
/shared/log /u/apps//shared/pids”  
servers: [“localhost”]  
connection failed for: localhost (NotImplementedError: unsupported  
encryption algorithm: `arcfour’)

And deploy.rb has  
role :web, “localhost”  
role :app, “localhost”  
role :db, “localhost”, :primary =\> true

It is a linux system.

Any suggesstion?

Thanks!

---

<div class="post-metadata">

**Author:** ![ssmile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@ssmile](https://www.ruby-forum.com/u/ssmile)\
**Post date:** [June 2, 2008, 8:19am UTC](https://www.ruby-forum.com/t/error-in-deploy-setup-concerning-arcfour/139217/2 "2008-06-02T08:19:12Z")

</div>

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)

Thanks!

---

<div class="post-metadata">

**Author:** ![ssmile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@ssmile](https://www.ruby-forum.com/u/ssmile)\
**Post date:** [August 3, 2008, 4:46pm UTC](https://www.ruby-forum.com/t/error-in-deploy-setup-concerning-arcfour/139217/3 "2008-08-03T16:46:32Z")

</div>

> > - executing “umask 02 && mkdir -p /u/apps/ /u/apps//  
> > releases /u/apps//shared /u/apps//shared/system /u/apps/  
> > /shared/log /u/apps//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](http://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
