# Error while opening SSH

**URL:** <https://www.ruby-forum.com/t/error-while-opening-ssh/105620>\
**Category:** Ruby\
**Created:** [May 31, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/error-while-opening-ssh/105620 "2007-05-31T20:01:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMMMMM](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5e9695/32.png) [@MMMMMM](https://www.ruby-forum.com/u/MMMMMM)\
**Post date:** [May 31, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/error-while-opening-ssh/105620/1 "2007-05-31T20:01:40Z")

</div>

I am new to ruby. I was planning to automate some deployment processes  
and ruby scripts seem to provide an excellent medium to achieve the  
same. I am trying to start an SSH session and I get following error  
shown below. I tried the solution provided at  
[http://www.mail-archive.com/removed\_email\_address@domain.invalid/msg01108.html](http://www.mail-archive.com/removed_email_address@domain.invalid/msg01108.html). I  
added the NI\_NUMERICSERV flag while getting the IP address in session.rb  
file as suggested in the post. But am still gettting the error. Am I  
missing anything here?

Thanks  
Mahesh

C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/net/ssh/host-  
key-verifier.rb:64:in `add_key': undefined method `mkdir’ for File:Class  
(NoMeth  
odError)  
from C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-  
ssh-1.1.0/lib/  
net/ssh/host-key-verifier.rb:25:in `verify' from C:/development_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/ net/ssh/lenient-host-key-verifier.rb:9:in `verify’  
from C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-  
ssh-1.1.0/lib/  
net/ssh/transport/kex/dh.rb:165:in `verify_server_key' from C:/development_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/ net/ssh/transport/kex/dh.rb:232:in `exchange\_keys’  
from  
C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/n  
eedle/lifecycle/proxy.rb:60:in ` __send__' from C:/development_tools/ruby/lib/ruby/gems/1.8/gems/needle-1.3.0/lib/n eedle/lifecycle/proxy.rb:60:in `method\_missing’  
from  
C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/  
net/ssh/transport/session.rb:183:in `exchange_keys' from C:/development_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0 /lib/ net/ssh/transport/session.rb:144:in `kexinit’  
… 31 levels…  
from  
C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/  
net/ssh/session.rb:106:in `initialize' from C:/development_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/ net/ssh.rb:47:in `new’  
from  
C:/development\_tools/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.1.0/lib/  
net/ssh.rb:47:in `start’  
from testssh.rb:3
