otaku
1/10/2005 3:06:00 AM
Code Producing Errors
==============
require 'needle'
require 'net/ssh'
Net::SSH.start( 'system.domain.com', 9090, 'username', 'password' )
do |session|
session.process.open( "bc" ) do |bc|
dialog = [ "5+5", "7*12", "sqrt(2.000000)", "quit" ]
bc.on_success do |p|
puts "requesting result of #{dialog.first}"
p.puts dialog.shift
end
bc.on_stdout do |p,data|
puts "--> #{data}"
unless dialog.empty?
puts "requesting result of #{dialog.first}"
p.puts dialog.shift
end
end
bc.on_exit do |p, status|
puts "process finished with exit status: #{status}"
end
end
end
==============
SSHD Server Running on Port 9090
===============
Ruby Version:
ruby 1.8.2 (2004-12-25) [powerpc-darwin7.7.0]
===============
OpenSSL Version:
Openssl 0.9.7e
================
ERRORS
======
/usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/agent.rb:70:in
`initialize': cannot convert nil into String (TypeError)
from /usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/agent.rb:70:in
`open'
from /usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/agent.rb:70:in
`connect!'
from
/usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/services.rb:51:in
`register_services'
from
/usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/services.rb:40:in
`call'
from /usr/local/lib/ruby/site_ruby/1.8/needle/service-point.rb:117:in
`instance'
from /usr/local/lib/ruby/site_ruby/1.8/needle/container.rb:308:in `[]'
from
/usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/services.rb:60:in
`open'
from
/usr/local/lib/ruby/site_ruby/1.8/net/ssh/userauth/services.rb:60:in
`open'
.... 6 levels...
from /usr/local/lib/ruby/site_ruby/1.8/net/ssh/session.rb:114:in
`initialize'
from /usr/local/lib/ruby/site_ruby/1.8/net/ssh.rb:47:in `new'
from /usr/local/lib/ruby/site_ruby/1.8/net/ssh.rb:47:in `start'
from /Applications/Downloads2/eclipse/workspace/System/ssh.rb:4
=======
END ERRORS
NOTE OpenSSL Patch Not Applied
assume openssl patch was merged into Ruby 1.8.2 stable
Please Advise:
Otaku.