# File lib/specinfra/backend/ssh.rb, line 9
      def run_command(cmd, opt={})
        cmd = build_command(cmd)
        cmd = add_pre_command(cmd)

        if get_config(:ssh_without_env)
          ret = ssh_exec!(cmd)
        else
          ret = with_env do
            ssh_exec!(cmd)
          end
        end

        ret[:stdout].gsub!(/\r\n/, "\n")
        ret[:stdout].gsub!(/\A\n/, "") if sudo?

        if @example
          @example.metadata[:command] = cmd
          @example.metadata[:stdout]  = ret[:stdout]
        end

        CommandResult.new ret
      end