mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
examples: Use ssh_session_update_known_hosts() for updating known_hosts
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -94,7 +94,8 @@ int verify_knownhost(ssh_session session)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(strncasecmp(buf,"yes",3)==0){
|
if(strncasecmp(buf,"yes",3)==0){
|
||||||
if (ssh_write_knownhost(session) < 0) {
|
rc = ssh_session_update_known_hosts(session);
|
||||||
|
if (rc != SSH_OK) {
|
||||||
ssh_clean_pubkey_hash(&hash);
|
ssh_clean_pubkey_hash(&hash);
|
||||||
fprintf(stderr, "error %s\n", strerror(errno));
|
fprintf(stderr, "error %s\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user