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

Re: SSH Key exchange (Kex error)


Please, provide debug log from the libssh session:

int verbosity = 4;
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);

The OpenSSH command you used adds this option to some list, while the
libssh operation limits the kex algorithms to this single algorithm.
The verbose log as mentioned above will show you what the server
supports.

Jakub

On Wed, Jan 31, 2024 at 1:26 PM Bhautik Radadiya
<radadiyabhautik55@xxxxxxxxx> wrote:
>
> Yes, we tried through manual ssh command like below, and we are into the devide.
>
> ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 Device_ip -p Port
>
> Not sure what's stopping us through libssh.
>
> Thanks
> Bhautik
>
> On Wed, Jan 31, 2024, 5:38 PM Andreas Schneider <asn@xxxxxxxxxxxxxx> wrote:
>>
>> On Wednesday, 31 January 2024 11:31:53 CET Bhautik Radadiya wrote:
>> > Hi,
>>
>> Hi,
>>
>> > Hope you all are well!
>> > I am facing this (kex error : no match for method kex algos) issue in my
>> > application while trying to connect to device.
>> > I am using libssh 0.9.5.
>> > I added this below line in my sshlib file but not working it.
>> >
>> > ssh_option_set (my_session, SSH_OPTIO NS_KEY_EXCHANGE,
>> > "diffie-hellman-group14-sha1");
>> >
>> > Can you please help me with this? Or Can you please provide some guidance.
>> > It will be great help.
>>
>>
>> are you sure that the device supports this kex?
>>
>> Did you enable verbose logging and check what the server returns?
>>
>>
>> Best regards
>>
>>
>>         Andreas
>>
>> --
>> Andreas Schneider                 asn@xxxxxxxxxxxxxx
>> GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D
>>
>>


Follow-Ups:
Re: SSH Key exchange (Kex error)Bhautik Radadiya <radadiyabhautik55@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org