--- net-ssh-1.1.0/lib/net/ssh/host-key-verifier.rb	2007-04-30 04:56:18.000000000 +0100
+++ net-ssh-1.1.0-hostkey/lib/net/ssh/host-key-verifier.rb	2007-05-10 14:31:06.000000000 +0100
@@ -10,10 +10,12 @@
             host = item[:host] || arguments[:peer][:host]
             ip   = item[:ip]   || arguments[:peer][:ip]
             port = item[:port] || arguments[:peer][:port]
+            type = item[:type]
 
             host == arguments[:peer][:host] &&
             ip   == arguments[:peer][:ip]   &&
-            port == arguments[:peer][:port]
+            port == arguments[:peer][:port] &&
+            type == arguments[:key].ssh_type
           end
 
         # we've never seen this host before, so just automatically add the key.
@@ -26,12 +28,11 @@
           return true
         end
 
-        # If we found any matches, check to see that the key type and
-        # blob also match.
+        # If we found any matches, check to see that the blob also
+        # matches.
         found = matches.any? do |item|
-            item[:type] == arguments[:key].ssh_type &&
-            item[:key]  == arguments[:key_blob]
-          end
+          item[:key]  == arguments[:key_blob]
+        end
 
         # If a match was found, return true. Otherwise, raise an exception
         # indicating that the key was not recognized.
@@ -105,4 +106,4 @@
     end
 
   end
-end
\ No newline at end of file
+end
