[BACK]Return to sshconnect.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshconnect.c between version 1.149 and 1.150

version 1.149, 2003/10/14 19:42:10 version 1.150, 2003/11/03 09:09:41
Line 48 
Line 48 
 extern pid_t proxy_command_pid;  extern pid_t proxy_command_pid;
   
 static int show_other_keys(const char *, Key *);  static int show_other_keys(const char *, Key *);
   static void warn_changed_key(Key *);
   
 /*  /*
  * Connect to the given ssh server using a proxy command.   * Connect to the given ssh server using a proxy command.
Line 777 
Line 778 
                                 error("Offending key for IP in %s:%d", ip_file, ip_line);                                  error("Offending key for IP in %s:%d", ip_file, ip_line);
                 }                  }
                 /* The host key has changed. */                  /* The host key has changed. */
                 fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);                  warn_changed_key(host_key);
                 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");  
                 error("@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @");  
                 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");  
                 error("IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!");  
                 error("Someone could be eavesdropping on you right now (man-in-the-middle attack)!");  
                 error("It is also possible that the %s host key has just been changed.", type);  
                 error("The fingerprint for the %s key sent by the remote host is\n%s.",  
                     type, fp);  
                 error("Please contact your system administrator.");  
                 error("Add correct host key in %.100s to get rid of this message.",                  error("Add correct host key in %.100s to get rid of this message.",
                     user_hostfile);                      user_hostfile);
                 error("Offending key in %s:%d", host_file, host_line);                  error("Offending key in %s:%d", host_file, host_line);
                 xfree(fp);  
   
                 /*                  /*
                  * If strict host key checking is in use, the user will have                   * If strict host key checking is in use, the user will have
Line 1036 
Line 1027 
                 debug2("no key of type %d for host %s", type[i], host);                  debug2("no key of type %d for host %s", type[i], host);
         }          }
         return (found);          return (found);
   }
   
   static void
   warn_changed_key(Key *host_key)
   {
           char *fp;
           char *type = key_type(host_key);
   
           fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
   
           error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
           error("@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @");
           error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
           error("IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!");
           error("Someone could be eavesdropping on you right now (man-in-the-middle attack)!");
           error("It is also possible that the %s host key has just been changed.", type);
           error("The fingerprint for the %s key sent by the remote host is\n%s.",
               type, fp);
           error("Please contact your system administrator.");
   
           xfree(fp);
           xfree(type);
 }  }

Legend:
Removed from v.1.149  
changed lines
  Added in v.1.150