Strange fault using net ssh

Hi all,

I am trying to use net ssh and it works well when I do it on a linux
box, but now when I try and use it on a security gateway it only outputs
“nil” at the end on all commands I try and send. the code I have is this

"
require ‘rubygems’
require ‘net/ssh’

@hostname = “192.168.100.1”
@port = “2222”
@username = “admin”
@password = “xxxxxxxx”
@cmd = “stats”

begin
ssh = Net::SSH.start(@hostname, @username, :password => @password,
:verbose => :debug, :port => @port )
res = ssh.exec!(@cmd)
puts res
rescue
puts “Unable to connect to #{@hostname} using
#{@username}/#{@password}”
end

attaching the debug output from the script.

Question: why does it behave like this on the SG and not on a linux box
and is there a way to solve this issue for me?

/Fox

From what little I understand it is this line that shows where it goes
belly up,
WARN – net.ssh.connection.session[e40cc]: ignoring request
:do_window_adjust for non-existent (closed?) channel; probably ssh
server bug

Is it a crappy ssh server that dont open a channel? and if it is can I
force it to open one from ruby?

/Fox