oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

raised Net::SSH::Exception (rescued RuntimeError) with msg "could not settle on host_key algorithm with ssh-ed25519

Open Atroskelis opened this issue 2 years ago • 3 comments

I'm not exactly sure where is the problem, net-ssh states ed25519 is natively supported since version 5+

oxidized (0.29.1) net-ssh (7.2.0)

This also seems to happen with oxidized 0.26.0 and net-ssh 5.2

installing ed25519 does not seem to have an effect

I'm not using SSH keys or certs, just plain username password

Dec 15 13:23:45 librenms oxidized[857314]: 10.138.1.50 raised Net::SSH::Exception (rescued RuntimeError) with msg "could not settle on host_key algorithm Server host_key preferences: ssh-ed25519 Client host_key preferences: [email protected],[email protected],[email protected],ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,[email protected],[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss"

Any help would be appreciated

full gem list

`*** LOCAL GEMS ***

abbrev (default: 0.1.0) asetus (0.4.0) backports (3.24.1) base64 (default: 0.1.0) bcrypt_pbkdf (1.1.0) benchmark (default: 0.1.1) bigdecimal (3.0.0) bundler (2.4.22, 2.2.33) cgi (default: 0.2.1) charlock_holmes (0.7.7) csv (default: 3.1.9) date (default: 3.1.3) dbm (default: 1.1.0) debug (default: 0.2.1) delegate (default: 0.2.0) did_you_mean (default: 1.5.0) digest (default: 3.0.0) drb (default: 2.0.5) ed25519 (1.3.0) emk-sinatra-url-for (0.2.1) english (default: 0.7.1) erb (default: 2.2.0) etc (default: 1.3.0) fcntl (default: 1.0.1) ffi (1.16.3) fiddle (default: 1.0.8) fileutils (default: 1.5.0) find (default: 0.1.0) forwardable (default: 1.3.2) gdbm (default: 2.1.0) getoptlong (default: 0.1.1) haml (5.2.2) htmlentities (4.3.4) io-console (0.5.7) io-nonblock (default: 0.1.0) io-wait (default: 0.2.0) ipaddr (default: 1.2.2) json (2.6.3, 2.5.1) logger (default: 1.4.3) matrix (default: 0.3.1) multi_json (1.15.0) mutex_m (default: 0.1.1) net-ftp (default: 0.1.2) net-http (default: 0.1.1) net-imap (default: 0.1.1) net-pop (default: 0.1.1) net-protocol (default: 0.1.1) net-smtp (default: 0.2.1) net-ssh (7.2.0) net-telnet (0.2.0) nkf (default: 0.1.0) observer (default: 0.1.1) open-uri (default: 0.1.0) open3 (default: 0.1.1) openssl (default: 2.2.1) optparse (default: 0.1.1) ostruct (default: 0.3.1) oxidized (0.29.1) oxidized-web (0.13.1) pathname (default: 0.1.0) pp (default: 0.2.1) prettyprint (default: 0.1.1) prime (default: 0.1.2) pstore (default: 0.1.1) psych (3.3.2) puma (3.11.4) racc (default: 1.5.2) rack (1.6.13) rack-protection (1.5.5) rack-test (0.7.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) rdoc (6.3.3) readline (default: 0.0.2) readline-ext (default: 0.1.1) reline (default: 0.2.5) resolv (default: 0.2.1) resolv-replace (default: 0.1.0) rinda (default: 0.1.1) rugged (1.7.1) sass (3.7.4) sass-listen (4.0.0) securerandom (default: 0.1.0) set (default: 1.0.1) shellwords (default: 0.1.0) sinatra (1.4.8) sinatra-contrib (1.4.7) singleton (default: 0.1.1) slop (4.10.1) stringio (default: 3.0.1) strscan (default: 3.0.1) syslog (default: 0.1.0) tempfile (default: 0.1.1) temple (0.10.3) tilt (2.3.0) time (default: 0.1.0) timeout (default: 0.1.1) tmpdir (default: 0.1.2) tracer (default: 0.1.1) tsort (default: 0.1.0) un (default: 0.1.0) uri (default: 0.10.1) weakref (default: 0.1.1) yaml (default: 0.1.1) zlib (default: 2.0.0) `

Atroskelis avatar Dec 15 '23 11:12 Atroskelis

Have you check that this ssh algorithm is enable on 2 devices ?

marmack95 avatar Apr 11 '24 15:04 marmack95

Have you check that this ssh algorithm is enable on 2 devices ?

I don't understand. The specific key is the only one offered by newer fortigates

Atroskelis avatar Apr 11 '24 15:04 Atroskelis

Your server seems not support ed25519 algorithm (or it's not enabled). You probably obtain the same error when you try to connect manually to your device from this server (ssh -vvv mydevice). This article can help you: https://www.endpointdev.com/blog/2023/04/ssh-host-key/

marmack95 avatar Apr 15 '24 10:04 marmack95