version 1.81, 2000/11/06 23:16:35 |
version 1.82, 2000/11/29 13:51:27 |
|
|
if (options.proxy_command != NULL && options.check_host_ip) |
if (options.proxy_command != NULL && options.check_host_ip) |
options.check_host_ip = 0; |
options.check_host_ip = 0; |
|
|
if (options.check_host_ip) { |
if (getnameinfo(hostaddr, hostaddr->sa_len, ntop, sizeof(ntop), |
if (getnameinfo(hostaddr, hostaddr->sa_len, ntop, sizeof(ntop), |
NULL, 0, NI_NUMERICHOST) != 0) |
NULL, 0, NI_NUMERICHOST) != 0) |
fatal("check_host_key: getnameinfo failed"); |
fatal("check_host_key: getnameinfo failed"); |
ip = xstrdup(ntop); |
ip = xstrdup(ntop); |
|
} |
|
|
|
/* |
/* |
* Store the host key from the known host file in here so that we can |
* Store the host key from the known host file in here so that we can |
|
|
char prompt[1024]; |
char prompt[1024]; |
char *fp = key_fingerprint(host_key); |
char *fp = key_fingerprint(host_key); |
snprintf(prompt, sizeof(prompt), |
snprintf(prompt, sizeof(prompt), |
"The authenticity of host '%.200s' 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, type, fp); |
host, ip, type, fp); |
if (!read_yes_or_no(prompt, -1)) |
if (!read_yes_or_no(prompt, -1)) |
fatal("Aborted by user!\n"); |
fatal("Aborted by user!\n"); |
} |
} |
|
|
*/ |
*/ |
break; |
break; |
} |
} |
if (options.check_host_ip) |
|
xfree(ip); |
xfree(ip); |
} |
} |
|
|
/* |
/* |