Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "Ssh$JschLogger: unknown alg: rsa-sha2-512" with FortiOS #300

Open
adrianodsb opened this issue Mar 22, 2024 · 2 comments
Open

Getting "Ssh$JschLogger: unknown alg: rsa-sha2-512" with FortiOS #300

adrianodsb opened this issue Mar 22, 2024 · 2 comments
Labels

Comments

@adrianodsb
Copy link

adrianodsb commented Mar 22, 2024

Hello,

Has anyone faced the issue below? I'm trying to backup the configuration from a FortiGate-40F device.

2024-03-22 15:30:58,617 WARN  [NetshotRunnerScheduler_Worker-1] TaskJob: Running the task 193703 of type onl.netfishers.netshot.work.tasks.TakeSnapshotTask
2024-03-22 15:30:59,682 ERROR [NetshotRunnerScheduler_Worker-1] Ssh$JschLogger: unknown alg: rsa-sha2-512
2024-03-22 15:30:59,694 WARN  [NetshotRunnerScheduler_Worker-1] CliScript: Unable to open an SSH connection to x.x.x.x:22.
java.io.IOException: verify: false
	at onl.netfishers.netshot.device.access.Ssh.connect(Ssh.java:487)
	at onl.netfishers.netshot.device.script.CliScript.connectRun(CliScript.java:185)
	at onl.netfishers.netshot.device.script.CliScript.connectRun(CliScript.java:134)
	at onl.netfishers.netshot.work.tasks.TakeSnapshotTask.run(TakeSnapshotTask.java:218)
	at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:94)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.jcraft.jsch.JSchException: verify: false
	at com.jcraft.jsch.Session.connect(Session.java:332)
	at onl.netfishers.netshot.device.access.Ssh.connect(Ssh.java:474)
	... 6 common frames omitted
2024-03-22 15:30:59,716 ERROR [NetshotRunnerScheduler_Worker-1] TakeSnapshotTask: Task 193703. Error while taking the snapshot.
java.io.IOException: Couldn't open either SSH or Telnet socket with the device.
	at onl.netfishers.netshot.device.script.CliScript.connectRun(CliScript.java:411)
	at onl.netfishers.netshot.device.script.CliScript.connectRun(CliScript.java:134)
	at onl.netfishers.netshot.work.tasks.TakeSnapshotTask.run(TakeSnapshotTask.java:218)
	at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:94)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2024-03-22 15:30:59,738 WARN  [NetshotRunnerScheduler_Worker-1] TaskJob: End of task 193703.

Already tried with and without setting the default algorithms in netshot's config:

netshot.cli.ssh.hostkeyalgorithms = rsa-sha2-256,rsa-sha2-512,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519

Any help is appreciated.

@SCadilhac
Copy link
Contributor

Hi,

rsa-sha2-512 is not actually supported by the underlaying SSH library.

You may want to try:

netshot.cli.ssh.hostkeyalgorithms = ssh-rsa,ssh-dss,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521

Regards,
Sylvain

@adrianodsb
Copy link
Author

Hi,

rsa-sha2-512 is not actually supported by the underlaying SSH library.

You may want to try:

netshot.cli.ssh.hostkeyalgorithms = ssh-rsa,ssh-dss,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521

Regards, Sylvain

This worked like a charm.

@SCadilhac SCadilhac added the bug label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants