Hi all,
I am having following code in ruby
require 'net/ssh'
require 'net/sftp'
begin
Net::SSH.start
('132.147.161.159',:password=>'k',:port=>1234,:username=>'k') do |ssh|
ssh.sftp.connect do |sftp|
Dir.foreach('.') do |file|
puts file
end
end
end
rescue Exception=> Ex
puts Ex.message
end
After executing the above code it is giving me following error
Bad file descriptor - connect(2)
username, password, and ipaddress are fine
What I want is to take data from remote machine to server.
Please Help me out.
Thanks and Regards,
Shri
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---