Home>

I want to create Ruby as a tool that SSHs to a cisco device and automatically acquires logs.

When you specify the address, user name and password from Net :: ssh and execute it,
"Could not settle on kex algorithm"
Is displayed
A message such as "diffie-hellman-group-sha1" cannot be specified is displayed.
I wondered if Net :: SSH.start needed an argument to solve it, but it didn't hit well even if I looked it up on my own. ..
If i know how to solve it, please teach me.

Ruby version is 2.7.1
net ssh is 6.1.0.

  • Answer # 1

    With Net :: SSH 6.0diffie-hellman-group-sha1Is deprecated and you can use itappend_all_supported_algorithms: trueIt is necessary to specify (Github).

  • Answer # 2

    From github

    Net :: SSH 6.0 disables by default the usage of weak algorithms. We strongly recommend that you install a servers's version that supports the latest algorithms.
    It is possible to return to the previous behavior by adding the option: append_all_supported_algorithms: true
    Unsecure algoritms will definitely be removed in Net :: SSH 7. *.