From: fox foxmaster Date: 2011-07-27T17:58:51+09:00 Subject: 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 Attachments: http://www.ruby-forum.com/attachment/6451/ssh_debug.txt -- Posted via http://www.ruby-forum.com/.