version 1.253, 2014/12/11 08:20:09 |
version 1.254, 2014/12/21 22:27:56 |
|
|
"key for IP address '%.128s' to the list " |
"key for IP address '%.128s' to the list " |
"of known hosts.", type, ip); |
"of known hosts.", type, ip); |
} else if (options.visual_host_key) { |
} else if (options.visual_host_key) { |
fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); |
fp = key_fingerprint(host_key, |
ra = key_fingerprint(host_key, SSH_FP_MD5, |
options.fingerprint_hash, SSH_FP_DEFAULT); |
SSH_FP_RANDOMART); |
ra = key_fingerprint(host_key, |
|
options.fingerprint_hash, SSH_FP_RANDOMART); |
logit("Host key fingerprint is %s\n%s\n", fp, ra); |
logit("Host key fingerprint is %s\n%s\n", fp, ra); |
free(ra); |
free(ra); |
free(fp); |
free(fp); |
|
|
else |
else |
snprintf(msg1, sizeof(msg1), "."); |
snprintf(msg1, sizeof(msg1), "."); |
/* The default */ |
/* The default */ |
fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); |
fp = key_fingerprint(host_key, |
ra = key_fingerprint(host_key, SSH_FP_MD5, |
options.fingerprint_hash, SSH_FP_DEFAULT); |
SSH_FP_RANDOMART); |
ra = key_fingerprint(host_key, |
|
options.fingerprint_hash, SSH_FP_RANDOMART); |
msg2[0] = '\0'; |
msg2[0] = '\0'; |
if (options.verify_host_key_dns) { |
if (options.verify_host_key_dns) { |
if (matching_host_key_dns) |
if (matching_host_key_dns) |
|
|
struct sshkey *plain = NULL; |
struct sshkey *plain = NULL; |
|
|
if ((fp = sshkey_fingerprint(host_key, |
if ((fp = sshkey_fingerprint(host_key, |
SSH_FP_MD5, SSH_FP_HEX)) == NULL) { |
options.fingerprint_hash, SSH_FP_DEFAULT)) == NULL) { |
error("%s: fingerprint host key: %s", __func__, ssh_err(r)); |
error("%s: fingerprint host key: %s", __func__, ssh_err(r)); |
r = -1; |
r = -1; |
goto out; |
goto out; |
|
|
continue; |
continue; |
if (!lookup_key_in_hostkeys_by_type(hostkeys, type[i], &found)) |
if (!lookup_key_in_hostkeys_by_type(hostkeys, type[i], &found)) |
continue; |
continue; |
fp = key_fingerprint(found->key, SSH_FP_MD5, SSH_FP_HEX); |
fp = key_fingerprint(found->key, |
ra = key_fingerprint(found->key, SSH_FP_MD5, SSH_FP_RANDOMART); |
options.fingerprint_hash, SSH_FP_DEFAULT); |
|
ra = key_fingerprint(found->key, |
|
options.fingerprint_hash, SSH_FP_RANDOMART); |
logit("WARNING: %s key found for host %s\n" |
logit("WARNING: %s key found for host %s\n" |
"in %s:%lu\n" |
"in %s:%lu\n" |
"%s key fingerprint %s.", |
"%s key fingerprint %s.", |
|
|
{ |
{ |
char *fp; |
char *fp; |
|
|
fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); |
fp = key_fingerprint(host_key, options.fingerprint_hash, |
|
SSH_FP_DEFAULT); |
|
|
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |