version 1.99, 2001/03/10 15:31:00 |
version 1.100, 2001/03/12 22:02:02 |
|
|
Key *file_key; |
Key *file_key; |
char *type = key_type(host_key); |
char *type = key_type(host_key); |
char *ip = NULL; |
char *ip = NULL; |
char hostline[1000], *hostp; |
char hostline[1000], *hostp, *fp; |
HostStatus host_status; |
HostStatus host_status; |
HostStatus ip_status; |
HostStatus ip_status; |
int local = 0, host_ip_differ = 0; |
int local = 0, host_ip_differ = 0; |
|
|
} else if (options.strict_host_key_checking == 2) { |
} else if (options.strict_host_key_checking == 2) { |
/* The default */ |
/* The default */ |
char prompt[1024]; |
char prompt[1024]; |
|
fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); |
snprintf(prompt, sizeof(prompt), |
snprintf(prompt, sizeof(prompt), |
"The authenticity of host '%.200s (%s)' can't be established.\n" |
"The authenticity of host '%.200s (%s)' can't be established.\n" |
"%s key fingerprint is %s.\n" |
"%s key fingerprint is %s.\n" |
"Are you sure you want to continue connecting (yes/no)? ", |
"Are you sure you want to continue connecting (yes/no)? ", |
host, ip, type, key_fingerprint(host_key)); |
host, ip, type, fp); |
|
xfree(fp); |
if (!read_yes_or_no(prompt, -1)) |
if (!read_yes_or_no(prompt, -1)) |
fatal("Aborted by user!"); |
fatal("Aborted by user!"); |
} |
} |
|
|
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); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
|
|
error("Someone could be eavesdropping on you right now (man-in-the-middle attack)!"); |
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("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.", |
error("The fingerprint for the %s key sent by the remote host is\n%s.", |
type, key_fingerprint(host_key)); |
type, fp); |
error("Please contact your system administrator."); |
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 |