« Return to Thread: Problem with net-ssh

Problem with net-ssh

by Chris Evans-8 :: Rate this Message:

Reply to Author | View in Thread

I'm working with net-ssh 2.0.11 and jruby 1.3.0.  When running this
simple script:
=======================
require 'rubygems'
require 'net/ssh'
Net::SSH.start('su-subdev01', 'wasuser', :verbose => :debug) do |ssh|
  output = ssh.exec!("hostname && uptime")
  puts output
end
=======================
I get this error:

D, [2009-06-29T14:34:09.199000 #25078] DEBUG --
net.ssh.transport.session[ae]: establishing connection to
su-subdev01:22
D, [2009-06-29T14:34:09.214000 #25078] DEBUG --
net.ssh.transport.session[ae]: connection established
I, [2009-06-29T14:34:09.215000 #25078]  INFO --
net.ssh.transport.server_version[b0]: negotiating protocol version
D, [2009-06-29T14:34:09.216000 #25078] DEBUG --
net.ssh.transport.server_version[b0]: remote is `SSH-2.0-Sun_SSH_1.1'
D, [2009-06-29T14:34:09.216000 #25078] DEBUG --
net.ssh.transport.server_version[b0]: local is
`SSH-2.0-Ruby/Net::SSH_2.0.11 java'
/usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh/transport/packet_stream.rb:63:in
`peer_ip': invalid address string (ArgumentError)
        from /usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:87:in
`host_as_string'
        from /usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:213:in
`prepare_preferred_algorithms!'
        from /usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:96:in
`initialize'
        from /usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:77:in
`initialize'
        from /usr/local/jruby_gems/gems/net-ssh-2.0.11/lib/net/ssh.rb:179:in
`start'
        from ./ssh.rb:5

It doesn't seem to matter what hostname I use.

Thanks,
Chris

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Problem with net-ssh