Trying to connect to netBackup using SSH
Hi,
I am trying to write a Java program to connect to the netbackup master servers, get status reports of the back ups done on the servers and create graphs/tables. I am using JSch library to maintain the ssh connections. When I try to connect, I get the following error:
Exception in thread "main" com.jcraft.jsch.JSchException: Algorithm negotiation fail
at com.jcraft.jsch.Session.receive_kexinit(Session.java:540)
at com.jcraft.jsch.Session.connect(Session.java:288)
at com.jcraft.jsch.Session.connect(Session.java:145)
at SSHConnection.connect(SSHConnection.java:21)
at SSHConnection.main(SSHConnection.java:25)
1. What kind of negotiation method do netbackup servers use? ex. Diffie Hellman, etc.
2. I am wondering if there are certain modifications I need to do in order to be able to connect, or if it is even possible to connect to them this way.
Looking online, people suggested me to modify the sshd_config file on the server, but I have no idea where it is on the server.
I can easily connect using secure shell but I want to automate this reporting procedure. So, I need to get the data to my java program automatically. Any suggestions?
1. All bash shells are automatically routed into the CLISH. You could break that but you'd break how the admin account works, and it'd automatically get overwritten on the next upgrade.
2. Is your code going to handle password prompts when running NetBackup commands to get those statuses you want ? If so, by all means make it prompt for a password. =)
You'd also have to disable some of the appliance security checking, I seem to recall it only allowing highly authorized users into the CLI - it's been a while since I dug into that though.