0

In my Project, I'm testing the connection with remote Windows 2008 server, through ssh. I'm always getting the following error:

Errno::ETIMEDOUT: Connection timed out - connect(2)
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh/transport/session.rb:70:in `initialize'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh/transport/session.rb:70:in `open'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh/transport/session.rb:70:in `block in initialize'
  from /home/kamesh/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
  from /home/kamesh/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/timeout.rb:97:in `timeout'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh/transport/session.rb:67:in `initialize'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh.rb:200:in `new'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/net-ssh-2.8.0/lib/net/ssh.rb:200:in `start'
  from /home/kamesh/projects/RubyApp/lib/connections/ssh_connection.rb:9:in `connect'
  from (irb):5
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/console.rb:90:in `start'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands/console.rb:9:in `start'
  from /home/kamesh/.rvm/gems/ruby-2.0.0-p353/gems/railties-4.0.2/lib/rails/commands.rb:62:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'
marvelousNinja
  • 1,510
  • 9
  • 15
Kamesh
  • 1,435
  • 1
  • 14
  • 27

1 Answers1

0

To ensure, what we're talking about the same thing - here's a link to Net::SSH GitHub page.

According to your error message, your ssh client can't connect to ssh server on another host.

First, you need to ensure that your server has server running. Here's a guide about how to install it on Windows Server 2008.

Second, you need to try and ping your server, to ensure if it's accessible through your network at all.

If there weren't any problems on previous stages, you can try to use Net::SSH again.

marvelousNinja
  • 1,510
  • 9
  • 15
  • Server is not responding for ping requests. but when i connect through ssh from terminal, it is responding. Could you please tell me what error it is. and why it is occuring? – Kamesh Feb 18 '14 at 05:53