# File lib/net/ssh/config.rb, line 58
      def load(file, host, settings={})
        file = File.expand_path(file)
        return settings unless File.readable?(file)
        
        matched_host = nil
        multi_host = []
        IO.foreach(file) do |line|
          next if line =~ /^\s*(?:#.*)?$/
          
          if line =~ /^\s*(\S+)\s*=(.*)$/
            key, value = $1, $2
          else
            key, value = line.strip.split(/\s+/, 2)
          end

          # silently ignore malformed entries
          next if value.nil?

          key.downcase!
          value = $1 if value =~ /^"(.*)"$/

          value = case value.strip
            when /^\d+$/ then value.to_i
            when /^no$/i then false
            when /^yes$/i then true
            else value
            end

          if key == 'host'
            # Support "Host host1 host2 hostN".
            # See http://github.com/net-ssh/net-ssh/issues#issue/6
            multi_host = value.split(/\s+/)
            matched_host = multi_host.select { |h| host =~ pattern2regex(h) }.first
          elsif !matched_host.nil?
            if key == 'identityfile'
              settings[key] ||= []
              settings[key] << value
            else
              settings[key] = value unless settings.key?(key)
            end
          end
        end
        
        return settings
      end