# File lib/net/ssh/config.rb, line 59
 59:       def load(path, host, settings={})
 60:         file = File.expand_path(path)
 61:         return settings unless File.readable?(file)
 62:         
 63:         globals = {}
 64:         matched_host = nil
 65:         multi_host = []
 66:         seen_host = false
 67:         IO.foreach(file) do |line|
 68:           next if line =~ /^\s*(?:#.*)?$/
 69:           
 70:           if line =~ /^\s*(\S+)\s*=(.*)$/
 71:             key, value = $1, $2
 72:           else
 73:             key, value = line.strip.split(/\s+/, 2)
 74:           end
 75: 
 76:           # silently ignore malformed entries
 77:           next if value.nil?
 78: 
 79:           key.downcase!
 80:           value = $1 if value =~ /^"(.*)"$/
 81:           
 82:           value = case value.strip
 83:             when /^\d+$/ then value.to_i
 84:             when /^no$/i then false
 85:             when /^yes$/i then true
 86:             else value
 87:             end
 88:           
 89:           if key == 'host'
 90:             # Support "Host host1 host2 hostN".
 91:             # See http://github.com/net-ssh/net-ssh/issues#issue/6
 92:             multi_host = value.to_s.split(/\s+/)
 93:             matched_host = multi_host.select { |h| host =~ pattern2regex(h) }.first
 94:             seen_host = true
 95:           elsif !seen_host
 96:             if key == 'identityfile'
 97:               (globals[key] ||= []) << value
 98:             else
 99:               globals[key] = value unless settings.key?(key)
100:             end
101:           elsif !matched_host.nil?
102:             if key == 'identityfile'
103:               (settings[key] ||= []) << value
104:             else
105:               settings[key] = value unless settings.key?(key)
106:             end
107:           end
108:         end
109:         
110:         settings = globals.merge(settings) if globals
111:         
112:         return settings
113:       end