lib/ztk/ssh/core.rb
# Attempts to close the SSH session if it is valid.
Attempts to close the SSH session if it is valid.
Attempts to close the SSH session if it is valid .
def close_ssh
        if (!@ssh.nil? && !@ssh.closed?)
          config.ui.logger.debug { "SSH object is valid and not closed" }
          begin
            config.ui.logger.debug { "attempting to close" }
            @ssh.close
            config.ui.logger.debug { "closed" }
          rescue Exception => e
            config.ui.logger.fatal { "EXCEPTION: #{e.inspect}" }
          end
        else
          config.ui.logger.debug { "SSH object is NIL!" }
        end
      end
def close_ssh if ( ! @ssh . nil? && ! @ssh . closed? ) config . ui . logger . debug { "SSH object is valid and not closed" } begin config . ui . logger . debug { "attempting to close" } @ssh . close config . ui . logger . debug { "closed" } rescue Exception => e config . ui . logger . fatal { "EXCEPTION: #{e.inspect}" } end else config . ui . logger . debug { "SSH object is NIL!" } end end
Attempts to close the SSH session if it is valid.
Attempts to close the SSH session if it is valid .