[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libssh - using ssh-rsa with latest build from master

----- Original Message -----
> From: "Ani A" <aniruddha.a@xxxxxxxxx>
> To: libssh@xxxxxxxxxx
> Sent: Tuesday, September 8, 2020 1:29:39 PM
> Subject: libssh - using ssh-rsa with latest build from master
> Hello,


> I built the latest libssh from master. I am trying to create a SSH
> client, to work
> with a Netconf server. When I try to connect to the server, I get the
> following message:
> kex error : no match for method server host key algo: server
> [ssh-rsa], client
> [ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256]
> I searched through this list and found:
> https://www.libssh.org/archive/libssh/2020-05/0000023.html
> As per the suggestion, I created a ~/.ssh/config file and also included a
> call
> to ssh_options_parse_config() in my client code. Still no luck!
> Is there a way to enable the 'ssh-rsa' option in the library/client code
> itself?
> (I can build the lib with the option enabled)

I tried the example client from master and added the following to my ~/.ssh/config:

# Apply this only to the matching host
    HostkeyAlgorithms ssh-rsa

... and successfully connected to the server using ssh-rsa.

ssh-rsa is disabled by default, but it can be enabled through configuration file.

Maybe the Host you tried did not match the one you added in the config?

I saw that the config in the email you referred had no address or hostname provided as argument to Host.
Could you please try again providing the remote host address or hostname in the Host entry in your config file?

For most of the cases you can follow the instructions given by "man ssh_config" as we try to keep the configuration file format compatible with OpenSSH.


libssh - using ssh-rsa with latest build from masterAni A <aniruddha.a@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org