Ad Widget

Collapse

Set SSH Autenthication in Action/Operation details

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newbie70
    Junior Member
    • Jul 2021
    • 7

    #1

    Set SSH Autenthication in Action/Operation details

    I created a new action to automatically restart the named daemon on a DNS server (Alma Linux) when it is no longer running. Everything works if I put the password as authentication method, but if I want to put SSH it doesn't work.
    I created the SSH keys on the Zabbix server (I use appliance) with the ssh-keygen command, I copied the public key on the DNS server with the ssh-copy-id command, no errors reported. If I try to connect from the Zabbix server to the DNS server using ssh root @ DNSServer it works.
    The error on zabbix server frontend is "Cannot access public key file /root/.ssh/id_rsa.pub".

    I don't understand if the problem is the public kI don't understand if the problem is the public key on the Zabbix server or on the DNS server. What permissions should I assign?
    The permissions on the public key are 644 on the zabbix server and 600 on the DNS server

    Attached Files
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    As long as I see... Your zabbix server (user zabbix) cannot see the public key file on that same server in /root/.sshd directory...permissions on file itself can be 644, but what are they for all the directories in path?
    Accessing anything as root is a bad idea from security perspective .....

    Comment

    Working...