SSH keys based sheduled backup "Could not authenticate"
Posted: Tue Dec 14, 2021 11:07 pm
Hi all,
I'm trying to configure a SSH backup between two XI servers, the "Test Connection" and "Test SCP transfer" both fail with a "Could not authenticate. " error. These are configured with the Publick Key method, manually executing a ssh/scp using the private key created by XI succeeds.
Config is as follows
SSH Server : FQDN of target
User : nagios
Port: 22
SSH Auth Type: Public Key
Remote Directory : /apps/backups/monprdappla011/
Server OS: RHE 8.5 ( both source/destination are the same image/build )
CIS hardened
Key details/permissions on source
-rw-r----- 1 apache nagios 2635 Nov 25 11:01 /usr/local/nagiosxi/var/keys/ssh.xi.1637798479
-rw-r----- 1 apache nagios 554 Nov 25 11:01 /usr/local/nagiosxi/var/keys/ssh.xi.1637798479.pub
The remote server is reporting the following in /var/log/secure
Dec 15 15:05:03 sshd[3400658]: AuthorizedKeysCommand /opt/ssh/ssh_auth_keys nagios failed, status 2
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Accepted key RSA SHA256:d/lUV1ONzhBXTh5LrMf1CGgfZr5zYbRLpJs9ItKxzAg found at /home/nagios/.ssh/authorized_keys:3
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Postponed publickey for nagios from 10.118.3.171 port 40246 ssh2 [preauth]
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Received disconnect from 10.118.3.171 port 40246:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Disconnected from authenticating user nagios 10.118.3.171 port 40246 [preauth]
Dec 15 15:05:03 monprdappla019 systemd: pam_unix(systemd-user:session): session closed for user root
Dec 15 15:05:03 monprdappla019 sshd[3400669]: Connection from 10.118.3.171 port 40248 on 10.118.3.176 port 22
Dec 15 15:05:04 monprdappla019 sshd[3400669]: AuthorizedKeysCommand /opt/ssh/ssh_auth_keys nagios failed, status 2
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Accepted key RSA SHA256:d/lUV1ONzhBXTh5LrMf1CGgfZr5zYbRLpJs9ItKxzAg found at /home/nagios/.ssh/authorized_keys:3
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Postponed publickey for nagios from 10.118.3.171 port 40248 ssh2 [preauth]
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Received disconnect from 10.118.3.171 port 40248:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Disconnected from authenticating user nagios 10.118.3.171 port 40248 [preauth]
As the sourcecode is protected , we're unable to determine what XI is performing.
Thanks in advance
I'm trying to configure a SSH backup between two XI servers, the "Test Connection" and "Test SCP transfer" both fail with a "Could not authenticate. " error. These are configured with the Publick Key method, manually executing a ssh/scp using the private key created by XI succeeds.
Config is as follows
SSH Server : FQDN of target
User : nagios
Port: 22
SSH Auth Type: Public Key
Remote Directory : /apps/backups/monprdappla011/
Server OS: RHE 8.5 ( both source/destination are the same image/build )
CIS hardened
Key details/permissions on source
-rw-r----- 1 apache nagios 2635 Nov 25 11:01 /usr/local/nagiosxi/var/keys/ssh.xi.1637798479
-rw-r----- 1 apache nagios 554 Nov 25 11:01 /usr/local/nagiosxi/var/keys/ssh.xi.1637798479.pub
The remote server is reporting the following in /var/log/secure
Dec 15 15:05:03 sshd[3400658]: AuthorizedKeysCommand /opt/ssh/ssh_auth_keys nagios failed, status 2
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Accepted key RSA SHA256:d/lUV1ONzhBXTh5LrMf1CGgfZr5zYbRLpJs9ItKxzAg found at /home/nagios/.ssh/authorized_keys:3
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Postponed publickey for nagios from 10.118.3.171 port 40246 ssh2 [preauth]
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Received disconnect from 10.118.3.171 port 40246:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 15 15:05:03 monprdappla019 sshd[3400658]: Disconnected from authenticating user nagios 10.118.3.171 port 40246 [preauth]
Dec 15 15:05:03 monprdappla019 systemd: pam_unix(systemd-user:session): session closed for user root
Dec 15 15:05:03 monprdappla019 sshd[3400669]: Connection from 10.118.3.171 port 40248 on 10.118.3.176 port 22
Dec 15 15:05:04 monprdappla019 sshd[3400669]: AuthorizedKeysCommand /opt/ssh/ssh_auth_keys nagios failed, status 2
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Accepted key RSA SHA256:d/lUV1ONzhBXTh5LrMf1CGgfZr5zYbRLpJs9ItKxzAg found at /home/nagios/.ssh/authorized_keys:3
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Postponed publickey for nagios from 10.118.3.171 port 40248 ssh2 [preauth]
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Received disconnect from 10.118.3.171 port 40248:11: PECL/ssh2 (http://pecl.php.net/packages/ssh2) [preauth]
Dec 15 15:05:04 monprdappla019 sshd[3400669]: Disconnected from authenticating user nagios 10.118.3.171 port 40248 [preauth]
As the sourcecode is protected , we're unable to determine what XI is performing.
Thanks in advance