Hello, we have recently found an issue with importing RSA host key of length 2048 but presumably the problem may occur also with other key types/lengths. It seems to work fine when libssh is compiled with OpenSSL but not with gcrypt. The problem is tracked on GitHub [1]. My query is whether anyone can tell me more about this/had the same problem and fixed it somehow. It would be best if there was a format compatible with both backend libraries. Thanks for any input.
Some more details regarding the problem, the key is generated by: openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -outform PEM Then, the header and footer is removed only to be added later [2] and stored back into a file. This file is then imported [3], which fails. Regards, Michal [1] https://github.com/CESNET/Netopeer2/issues/534 [2] https://github.com/CESNET/libnetconf2/blob/devel/src/session_server_ssh.c#L43 [3] https://github.com/CESNET/libnetconf2/blob/devel/src/session_server_ssh.c#L1291
