“Algorithm negotiation fail” error in JSch when trying to connect to Symantec NetBackup - grabing reports remotely

最后都变了- 提交于 2019-12-01 12:05:10

问题


I have been searching online and found similar posts but could not find a solution reading them.

I am trying to connect to NetBackup servers using ssh from my computer and run a report and create graphs based on them. I am doing this using java and JSch library. The problem is that I get:

"Algorithm negotiation fail" at com.jcraft.JSch.Session.recieve_kexinit(...

I know very little about negotiations and keys and different methods such as diffie-hellman etc. Could you please tell me: 1. How can I find out what methods does the server accept? 2. If I need to set up a negotiation method, how would I do that?

The logger only tells me this:

The remote version string: SSH-2.0-OpenSSH_5.1 The local version string: SSH-2.0-JSCH-0.1.31 SSH_MSG_KEXINIT received SSH_MSG_KEXINIT sent

PS. I am working under a restricted system, meaning that I cannot make changes on the server. Please let me know if you need additional information.

Thanks


回答1:


After doing a lot of research, I figured that to be able to have an SSH connection with Netbackup, you have to create a local user with access to bash shell, then allow root access to this user, since the netbackup commnands require you to be a superuser. Then, you can have ssh access to that account and run the scripts you want remotely. If you want to use Jsch, you jave to download and install Java criptography Extension in C:\Program Files\Java\jre6\lib\security. But I could not do that since I want not allowed due to company policies. So, I created powershell scripts that my Java program runs in order to connect and run the reports and put the output in a text file.

There are applications such as Opscenter that already create reports for you; however, if you are in a situation like me where you need customized reports, this is the way to go.

Hope this helps.



来源:https://stackoverflow.com/questions/30489998/algorithm-negotiation-fail-error-in-jsch-when-trying-to-connect-to-symantec-ne

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!