Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. SSH error "can't agree on KEX algorithms"

SSH error "can't agree on KEX algorithms"

Scheduled Pinned Locked Moved Support
10 Posts 3 Posters 34.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    E
    Egert143
    wrote on last edited by
    #1

    Hello

    Has anyone experienced following issue: I have set NetXms to poll Mikrotik router via ssh and each time when attempt is made, router generates error "can't agree on KEX algorithms". When i log in manualy via ssh, then no error. Seems like it started with NetXms version 3.5.90. It used to work on older version and polling script hasent changed.

    Egert

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      So when router generates this error the connection does not happen and data is not collected?

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi,

        in 3.4 we have added reading SSH config by SSH subagent - could it be that you have something configured there? Also, what KEX algorithms this Mikrotik supports? You can run ssh with -v option and check it. This is sample output from my router:

        debug1: SSH2_MSG_KEXINIT sent
        debug1: SSH2_MSG_KEXINIT received
        debug1: kex: algorithm: diffie-hellman-group-exchange-sha256

        Best regards,
        Victor

        1 Reply Last reply
        0
        • E
          E
          Egert143
          wrote on last edited by
          #4

          ssh debug from router: https://ibb.co/pwxSv02

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

            Looks like router supports only ssh-dss and ssh-rsa as host key algorithms and they are not offered by client. You may try to add

            HostKeyAlgorithms +ssh-rsa

            to your .ssh/config file, or create separate config file for SSH subagent with that line and specify it in nxagentd.conf by adding

            ConfigFile = path_to_config

            in section [SSH].

            Best regards,
            Victor

            1 Reply Last reply
            0
            • E
              E
              Egert143
              wrote on last edited by
              #6

              Seems like its not working when i change agent conf to include

              [SSH]
              HostKeyAlgorithms +ssh-rsa
              

              and restart agent. "cl" line didnt change in debug.

              1 Reply Last reply
              0
              • V
                V
                Victor Kirhenshtein
                wrote on last edited by
                #7

                In agent config you should specify path to SSH config - you cannot just put SSH configuration options to NetXMS agent config. So in nxagentd.conf you should have something like

                [SSH]
                ConfigFile = /etc/nxagentd-ssh-config
                

                and in file /etc/nxagentd-ssh-config

                HostKeyAlgorithms +ssh-rsa
                

                Best regards,
                Victor

                1 Reply Last reply
                0
                • E
                  E
                  Egert143
                  wrote on last edited by
                  #8

                  Still no go.

                  Did the following:

                  nxagentd.conf

                  [SSH]
                  ConfigFile = D:\NetXMS\etc\nxagentd-ssh-config.conf
                  

                  nxagentd-ssh-config.conf

                  HostKeyAlgorithms +ssh-rsa
                  

                  restarted agent. In router ssh debug CL line doesent include ssh-rsa

                  1 Reply Last reply
                  0
                  • E
                    E
                    Egert143
                    wrote on last edited by
                    #9

                    Any other ideas ? 🙂 Would be quite bad if Netxms support for Mikrotik ssh is broken.

                    1 Reply Last reply
                    0
                    • E
                      E
                      Egert143
                      wrote on last edited by
                      #10

                      Got it working:

                      File: nxagentd-ssh-config.conf

                      HostKeyAlgorithms ssh-dss
                      KexAlgorithms diffie-hellman-group1-sha1
                      
                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      Powered by NodeBB Contributors
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups