SSH host key converted to PEM fails in libssh ("unknown type") #557
Replies: 3 comments 6 replies
-
| 
         this is the configuration that is saved in the datastore, maybe this information will also help:  | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         Hello, what versions of libssh and openssl and what platform are you using? The scenario you described should generally work. Is the   | 
  
Beta Was this translation helpful? Give feedback.
-
        
 No, this format is correct. 
 Yes. Generally there is no restriction on the private key format when it is used as a hostkey, but there is one for the public key format - it has to conform to the "ssh-public-key-format" identity defined in ietf-crypto-types YANG module. If I recall correctly, the conversion to PEM was used to utilize the ability of OpenSSL to help generate a public key from its private key in said format. The original private key was then discarded and the PEM generated by OpenSSL was used. 
 Judging by this  
 There are two options - either use the API such as  I agree that the private key format conversion might be misleading and will look into keeping it in the same format - it should not however lead to the failure of loading a private key. Could you please provide the commands used to generate the private key?  | 
  
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a problem with SSH host key handling in libnetconf2 v3.7.10 (latest).
What happens
nc_server_config_add_ch_ssh_hostkey().nc_ssh_bind_add_hostkeys()runs, it writes the key into a temporary file and calls:ssh_bind_options_set(sbind, SSH_BIND_OPTIONS_HOSTKEY, tmp_path)Failed to set hostkey ..."-----BEGIN RSA PRIVATE KEY-----"type.My questions
Beta Was this translation helpful? Give feedback.
All reactions