| 538 |
|
|
| 539 |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_RSA_KEY_FILE) < 0) |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_RSA_KEY_FILE) < 0) |
| 540 |
{ |
{ |
| 541 |
log_error("Error setting SSH RSA key: %s\n", SSH_HOST_RSA_KEY_FILE); |
log_error("Error loading SSH RSA key: %s\n", SSH_HOST_RSA_KEY_FILE); |
| 542 |
} |
} |
| 543 |
else |
else |
| 544 |
{ |
{ |
| 546 |
} |
} |
| 547 |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ED25519_KEY_FILE) < 0) |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ED25519_KEY_FILE) < 0) |
| 548 |
{ |
{ |
| 549 |
log_error("Error setting SSH ED25519 key: %s\n", SSH_HOST_ED25519_KEY_FILE); |
log_error("Error loading SSH ED25519 key: %s\n", SSH_HOST_ED25519_KEY_FILE); |
| 550 |
|
} |
| 551 |
|
else |
| 552 |
|
{ |
| 553 |
|
ssh_key_valid = 1; |
| 554 |
|
} |
| 555 |
|
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY, SSH_HOST_ECDSA_KEY_FILE) < 0) |
| 556 |
|
{ |
| 557 |
|
log_error("Error loading SSH ECDSA key: %s\n", SSH_HOST_ECDSA_KEY_FILE); |
| 558 |
} |
} |
| 559 |
else |
else |
| 560 |
{ |
{ |
| 570 |
|
|
| 571 |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDADDR, hostaddr) < 0 || |
if (ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDADDR, hostaddr) < 0 || |
| 572 |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDPORT, &port) < 0 || |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_BINDPORT, &port) < 0 || |
| 573 |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, "ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-ed25519") < 0 || |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_HOSTKEY_ALGORITHMS, "+ssh-rsa") < 0 || |
| 574 |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_LOG_VERBOSITY, &ssh_log_level) < 0) |
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_LOG_VERBOSITY, &ssh_log_level) < 0) |
| 575 |
{ |
{ |
| 576 |
log_error("Error setting SSH bind options: %s\n", ssh_get_error(sshbind)); |
log_error("Error setting SSH bind options: %s\n", ssh_get_error(sshbind)); |