Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17076

Cannot Monitor Host with SSH Agent => Cannot access public key file /home/zabbix/.ssh/id_rsa.pub

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 4.4.3
    • None
    • None

      Steps to reproduce:

      • Followed procedure to enable SSH with Keypair
      • Configure Item with SSH Agent 

       

        • No Passphrase on Private Key*
        • File Permission* 

      root@zabbix:/home/zabbix/.ssh# ls -lsa id_rsa*
      4 rw------ 1 zabbix zabbix 1679 Dec 12 15:12 id_rsa
      4 -rwxr-xr-x 1 zabbix zabbix 381 Dec 12 15:12 id_rsa.pub

       

      However I'm having this issue : 

      # SUCESS in Root
      root@zabbix:/home/zabbix/.ssh# ssh -i id_rsa -p 2222 [email protected]
      system/root # 
      Connection to 1.1.1.1 closed.
      
      # FAIL in ZAbbix user 
      root@zabbix:/home/zabbix/.ssh# sudo -u zabbix ssh -i id_rsa -p 2222 [email protected]
      Warning: Identity file id_rsa not accessible: Permission denied.
      The authenticity of host '[1.1.1.1]:2222 ([1.1.1.1]:2222)' can't be established.
      RSA key fingerprint is SHA256:bCm3+5KuXdqkRMLK31XhBsth1FH+z4oiJOfDMi93FaM.
      Are you sure you want to continue connecting (yes/no)? yes
      Failed to add the host to the list of known hosts (/home/zabbix/.ssh/known_hosts).
      Permission denied (publickey).
      root@zabbix:/home/zabbix/.ssh#
      

      however the permission are right. 

       

       

      Result:

      Then got 

      became not supported: Cannot access public key file /home/zabbix/.ssh/id_rsa.pub

      And 

       

      The permission and ownership of keypair are right however it seem zabbix user didn't have access. 

       

      Question: 

      Do you have any hint how can I solve this ? 

       

            zabbix.support Zabbix Support Team
            gaspar Gaspar Christophe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: