Skip to content

Commit 80075de

Browse files
committed
ssh server CHANGE error message includes key path
1 parent ef83c61 commit 80075de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/session_server_ssh.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,11 +1312,14 @@ nc_ssh_bind_add_hostkeys(ssh_bind sbind, const char **hostkeys, uint8_t hostkey_
13121312
if (privkey_data && unlink(privkey_path)) {
13131313
WRN("Removing a temporary host key file \"%s\" failed (%s).", privkey_path, strerror(errno));
13141314
}
1315-
free(privkey_path);
13161315
free(privkey_data);
13171316

13181317
if (ret != SSH_OK) {
1319-
ERR("Failed to set hostkey \"%s\" (%d: %s).", hostkeys[i], ret, ssh_get_error(sbind));
1318+
ERR("Failed to set hostkey \"%s\" (%s).", hostkeys[i], privkey_path);
1319+
}
1320+
free(privkey_path);
1321+
1322+
if (ret != SSH_OK) {
13201323
return -1;
13211324
}
13221325
}

0 commit comments

Comments
 (0)