Hi, Yes, you are right, actually config file get override and we are using that highlighted kex algorithms and our libssh changes are not working.
Thank you so much for all the support. It was really helpful. Thanks Bhautik On Thu, Feb 1, 2024, 4:06 PM Jakub Jelen <[email protected]> wrote: > Hi, > if this is with the following option applied, it does not sounds like > working: > > ssh_option_set (my_session, SSH_OPTIONS_KEY_EXCHANGE, > "diffie-hellman-group14-sha1"); > > check if there is no other line in the code that would set the > highlighted kex options or if there is no configuration file that > would override this. > > Jakub > > On Thu, Feb 1, 2024 at 11:11 AM Bhautik Radadiya > <[email protected]> wrote: > > > > Hi, > > We added that log verbose option but not able to see session logs, but > > > > This exception in image might help you to understand issue. > > We are getting it even after adding that set option line which i > mentioned earlier. > > > > Thanks > > Bhautik > > > > On Thu, Feb 1, 2024, 2:47 PM Jakub Jelen <[email protected]> wrote: > >> > >> 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 > >> <[email protected]> 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 <[email protected]> > 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 [email protected] > >> >> GPG-ID: 8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D > >> >> > >> >> > >> > >> > > >
