Net/ssh debug errors

=begin
Hey all,

Code some code here that --works–, only that running it with the debug
option throws up some errors. I’ understand that net/ssh requires
openssl, which I have built, but maybe it’s in a non-standard
location. Can anyone throw some light on this?

gem list --local

*** LOCAL GEMS ***

needle (1.3.0)
Needle is a Dependency Injection/Inversion of Control container for
Ruby. It supports both type-2 (setter) and type-3 (constructor)
injection. It takes advantage of the dynamic nature of Ruby to
provide a rich and flexible approach to injecting dependencies.

net-ssh (1.1.2)
Net::SSH is a pure-Ruby implementation of the SSH2 client protocol.

sources (0.0.1)
This package provides download sources for remote gem installation

I have built the openssl with make && make install, no other options.

ls ~/proj/build/packages/openssl-snapshot-20040726/
dep openssl_missing.c ossl_bn.c ossl_config.h ossl_hmac.c
ossl_pkcs12.c ossl_pkey_dsa.c ossl_ssl.h ossl_x509ext.c
ruby_missing.h
extconf.rb openssl_missing.h ossl_bn.h ossl_digest.c
ossl_hmac.h ossl_pkcs12.h ossl_pkey.h ossl_version.h
ossl_x509.h
GNUmakefile ossl_asn1.c ossl.c ossl_digest.h ossl_ns_spki.c
ossl_pkcs7.c ossl_pkey_rsa.c ossl_x509attr.c ossl_x509name.c
lib ossl_asn1.h ossl_cipher.c ossl_engine.c ossl_ns_spki.h
ossl_pkcs7.h ossl_rand.c ossl_x509.c ossl_x509req.c
Makefile ossl_bio.c ossl_cipher.h ossl_engine.h ossl_ocsp.c
ossl_pkey.c ossl_rand.h ossl_x509cert.c ossl_x509revoked.c
MANIFEST ossl_bio.h ossl_config.c ossl.h ossl_ocsp.h
ossl_pkey_dh.c ossl_ssl.c ossl_x509crl.c ossl_x509store.c

Here’s the code. Note that it does work but just throwing up errors.

=end

#!/usr/bin/env ruby -d

-- mode: ruby --

=begin
Wed Apr 23 15:49:42 BST 2008
=end

require ‘rubygems’
require ‘net/ssh’

Net::SSH.start(‘localhost’) do |session|
p “new session started on localhost”
session.open_channel do |channel|
p “we have a new channel open on localhost”
channel.close
end
session.loop
end

END

results…

ruby -d ssh-channels.rb
Exception LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- net/ssh ExceptionErrno::ENOENT’ at
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60

  • No such file or directory - /home/jayeola/.ssh/known_hosts2
    Exception `Errno::ENOENT’ at
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60
  • No such file or directory - /etc/ssh/ssh_known_hosts
    Exception `Errno::ENOENT’ at
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60
  • No such file or directory - /etc/ssh/ssh_known_hosts2
    Exception LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- termios ExceptionLoadError’ at
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34 - no such file
    to load – termios
    Exception `Errno::ENOENT’ at
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60
  • No such file or directory - /home/jayeola/.ssh/known_hosts2
    Exception `Errno::ENOENT’ at
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60
  • No such file or directory - /etc/ssh/ssh_known_hosts
    Exception `Errno::ENOENT’ at
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/known-hosts.rb:60
  • No such file or directory - /etc/ssh/ssh_known_hosts2
    “new session started on localhost”
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/connection/driver.rb:392:
    warning: instance variable @processing_data_requests not initialized
    “we have a new channel open on localhost”
    /usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/connection/channel.rb:495:
    warning: instance variable @on_close not initialized

On Mon, Apr 28, 2008 at 2:44 PM, John M. [email protected] wrote:

lib ossl_asn1.h ossl_cipher.c ossl_engine.c ossl_ns_spki.h ossl_pkcs7.h ossl_rand.c ossl_x509.c ossl_x509req.c

p "we have a new channel open on localhost"

ruby -d ssh-channels.rb
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/connection/driver.rb:392: warning: instance variable @processing_data_requests not initialized
“we have a new channel open on localhost”
/usr/lib/ruby/gems/1.8/gems/net-ssh-1.1.2/lib/net/ssh/connection/channel.rb:495: warning: instance variable @on_close not initialized

I guess that’s because in debug mode you even the caught exceptions.
So no need to worry.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs