Page 1 of 1

Remote backups - Could not authenticate

Posted: Mon Jul 13, 2020 8:34 am
by razah
Hi

I am trying to get remote backups working from my nagiosxi server to a backup nagiosxi server both are centos 7 vms.

When i try an authenticate using ssh keys i get Could not authenticate. However if i use a password it works. i can not see anything in /var/logs/secure on the backup server to give any clues to why it is failing

I have looked at this post https://support.nagios.com/forum/viewto ... 47&start=0 but that has not helped.

Any ideas ?

Re: Remote backups - Could not authenticate

Posted: Tue Jul 14, 2020 10:17 am
by jbrunkow
I'm not sure that SSL errors will be written there. Can you try looking in the following logs instead?

Code: Select all

/usr/local/nagiosxi/var/components/scheduledbackups.log
/usr/local/nagiosxi/var/cmdsubsys.log
/var/log/httpd/error_log
/var/log/httpd/access_log
NAGIOS XI LOGS
That may give you a more detailed picture of what is going on.

Could the SSL certificate be expired?

It never hurts to send ( PM ) us a profile either! We can find lots of information about your system in there. You can download the profile by navigating to System Profile under System Config on the left pane > and clicking the Download Profile button on that page.

Re: Remote backups - Could not authenticate

Posted: Tue Jul 14, 2020 11:24 am
by lmiltchev
Can you go to Admin > System Backup > Scheduled Backups > SSH tab and show a screenshot of that page?

Did you copy the public key from the Nagios XI server to the authorized_keys on the remote "backup" server?

Example:

Code: Select all

ssh-copy-id -i /usr/local/nagiosxi/var/keys/ssh.xi.xxx.pub user@remoteip
Try testing the connection from the command line by running:

Code: Select all

sudo -u nagios ssh -i /usr/local/nagiosxi/var/keys/ssh.xi.xxx user@remoteip
enter the private key password when asked (you can view/copy it from the GUI) to see if the connection will succeed.

Example:

Code: Select all

[root@main-nagios-xi]# sudo -u nagios ssh -i /usr/local/nagiosxi/var/keys/ssh.xi.1594741274 [email protected]
Enter passphrase for key '/usr/local/nagiosxi/var/keys/ssh.xi.1594741274':
Last login: Tue Jul 14 11:02:28 2020 from y.y.y.y
[root@nagios-core ~]# exit
logout
Connection to x.x.x.x closed.