SSH backup via GUI
-
absarcompass
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
SSH backup via GUI
Hi guys,
I have enable ssh backup from nagiosxi 5.5.7 web interface but it is not authenticating.
I can do ssh and scp from my nagiosxi command line which certainly means that there is no issue of connectivity and authentication
can you suggest what might be causing an issue here
cheers
I have enable ssh backup from nagiosxi 5.5.7 web interface but it is not authenticating.
I can do ssh and scp from my nagiosxi command line which certainly means that there is no issue of connectivity and authentication
can you suggest what might be causing an issue here
cheers
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SSH backup via GUI
Hello, @absarcompass. Do you see any errors in the following log file?
Also, click on the test authentication button a few times and then upload the /var/log/secure and /var/log/messages from the remote SCP server./usr/local/nagiosxi/var/components/scheduledbackups.log
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
absarcompass
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: SSH backup via GUI
Thanks
looks like schedule backup is either not logging or not finding anything worthy of logging
in addition to that secure/auth log has the below with nothing in messages
(I have removed IP address from log)
looks like schedule backup is either not logging or not finding anything worthy of logging
[root@nagiosxi components]# tail -f /usr/local/nagiosxi/var/components/scheduledbackups.log
09-22-2017 05:30:06 DEBUG: Running scheduled FTP backup ...
09-22-2017 05:30:06 DEBUG: Sending create local backup command to CmdSubsystem
09-29-2017 05:30:06 DEBUG: Running scheduled FTP backup ...
09-29-2017 05:30:06 DEBUG: Sending create local backup command to CmdSubsystem
10-06-2017 05:30:06 DEBUG: Running scheduled FTP backup ...
10-06-2017 05:30:06 DEBUG: Sending create local backup command to CmdSubsystem
10-13-2017 05:30:06 DEBUG: Running scheduled FTP backup ...
10-13-2017 05:30:06 DEBUG: Sending create local backup command to CmdSubsystem
10-20-2017 05:30:06 DEBUG: Running scheduled FTP backup ...
10-20-2017 05:30:06 DEBUG: Sending create local backup command to CmdSubsystem
in addition to that secure/auth log has the below with nothing in messages
(I have removed IP address from log)
Cheers!Dec 17 09:25:23 sshd[975]: Received disconnect from x.x.x.x port 58531:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 17 09:25:23 sshd[975]: Disconnected from authenticating user nagiosxi x.x.x.x port 58531 [preauth]
Dec 17 09:25:23 sshd[977]: Received disconnect from x.x.x.x port 58532:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 17 09:25:23 sshd[977]: Disconnected from authenticating user nagiosxi x.x.x.x port 58532 [preauth]
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SSH backup via GUI
@absarcompass, Does the login or password to the remote FTP server contain any special characters? If so please try temporarily changing the password to something simple with no special characters. Let me know if the authentication starts working.
Also, you tried to ssh/scp from the command line, right? Now please sign in as the nagios user and try the same commands again:
Also, you tried to ssh/scp from the command line, right? Now please sign in as the nagios user and try the same commands again:
Finally, please update to the latest version of XI -> 5.5.8.su - nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
absarcompass
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: SSH backup via GUI
Hi
it didn't work with even simpler password from web interface
ssh worked from user nagios to remote server,
it didn't work with even simpler password from web interface
ssh worked from user nagios to remote server,
Re: SSH backup via GUI
Did you test like this?
Does it prompt you with this still or did it store it already?
Code: Select all
su - nagios
ssh [email protected]Code: Select all
The authenticity of host '192.168.X.X (192.168.X.X)' can't be established.
ECDSA key fingerprint is SHA256:cak0s3xE/fYTjxTSyFROsMHvWAWUmmEd7IUr+HSE8iU.
ECDSA key fingerprint is MD5:22:13:2a:43:a6:11:44:57:ed:c4:c5:56:b7:41:87:64.
Are you sure you want to continue connecting (yes/no)?-
absarcompass
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: SSH backup via GUI
Hi ssax,
it wasn't but now it is already saved
does web gui has a different user for apache or php? it should work if it is working from command line
it wasn't but now it is already saved
does web gui has a different user for apache or php? it should work if it is working from command line
Re: SSH backup via GUI
Should run as apache user.
Are you using a DNS name for the hostname or an IP address? If you're using a hostname, please try using the IP address and see if that works.
Do you see any errors in /var/log/httpd/error_log or in /var/log/httpd/ssl_error_log on the XI server when you click the Test Connection button?
You can run this tail command and then hit the test button to see if anything is output:
Are you using a DNS name for the hostname or an IP address? If you're using a hostname, please try using the IP address and see if that works.
Do you see any errors in /var/log/httpd/error_log or in /var/log/httpd/ssl_error_log on the XI server when you click the Test Connection button?
You can run this tail command and then hit the test button to see if anything is output:
Code: Select all
tail -F /var/log/httpd/error_log /var/log/httpd/ssl_error_log-
absarcompass
- Posts: 182
- Joined: Thu May 14, 2015 9:57 pm
Re: SSH backup via GUI
Hi ssax,
No, the hostname is ip address
there are logs only in /var/log/httpd/error_log
No, the hostname is ip address
there are logs only in /var/log/httpd/error_log
But the same username and password with same port is authenticating in remote server from command line,==> /var/log/httpd/error_log <==
[Fri Dec 21 08:57:48 2018] [error] [client 192.168.222.253] PHP Warning: ssh2_auth_password(): Authentication failed for nagiosxi using password in /usr/local/nagiosxi/html/includes/components/scheduledbackups/ajaxcalls.php on line 0, referer: http://nagiosxi.compassnet.co.nz/nagios ... ackups.php
[Fri Dec 21 08:59:14 2018] [error] [client 192.168.222.253] PHP Warning: ssh2_auth_password(): Authentication failed for nagiosxi using password in /usr/local/nagiosxi/html/includes/components/scheduledbackups/ajaxcalls.php on line 0, referer: http://nagiosxi.compassnet.co.nz/nagios ... ackups.php
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
[Fri Dec 21 09:02:16 2018] [error] [client 192.168.222.253] PHP Warning: ssh2_auth_password(): Authentication failed for nagiosxi using password in /usr/local/nagiosxi/html/includes/components/scheduledbackups/ajaxcalls.php on line 0, referer: http://nagiosxi.compassnet.co.nz/nagios ... ackups.php
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: SSH backup via GUI
@absarcompass, Please sign in to the ssh backup server and open the following file:
Also, when you ran the ssh command from the command line, did it ask you for a password or no?
Let me know if PasswordAuthentication is set to yes or no./etc/ssh/sshd_config
Also, when you ran the ssh command from the command line, did it ask you for a password or no?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.