patricegautier / unifiZabbix

Zabbix templates to monitor pretty much all Unifi devices
184 stars 36 forks source link

Access to the public and private keys #34

Closed nabberuk closed 2 years ago

nabberuk commented 2 years ago

I have followed the guide but there is an issue with Zabbix access the public/private keys.

When testing with sudo -u zabbix ssh -i <fullPathToYourPrivateKey> yourUserName@oneOfYourUnifiDevicesIP it connects fine, but when i have added a host i am getting the following.

Warning: Identity file /home/dsatadmin/.ssh/zabbix not accessible: No such file or directory.
Permission denied, please try again.
Permission denied, please try again.
dsatadmin@10.58.64.111: Permission denied (publickey,password).

i have checked they have the correct permissions and can see the user zabbix listed when doing a ls -l in the directory.

I should add that i'm on Ubuntu and if i try to cd to ~/.ssh i get no directory found. I'm unsure if this is related to the issue.

nabberuk commented 2 years ago

Oddly, if i do a test run i get the following, i'm not sure where it is getting /var/lib/zabbix/.ssh/zabbix from.

Warning: Identity file /var/lib/zabbix/.ssh/zabbix/ not accessible: No such file or directory.
Permission denied, please try again.
Permission denied, please try again.
dsatadmin@10.58.64.111: Permission denied (publickey,password).
{ "mcaDumpError": "ssh returned an error"  }