Ad Widget

Collapse

SSH check error: Cannot connect to [127.0.0.1:22]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uraniumscrap
    Junior Member
    • Mar 2010
    • 2

    #1

    SSH check error: Cannot connect to [127.0.0.1:22]

    I have Zabbix server at host A and Zabbix agent at host B. Zabbix checks sshd at host B:

    Code:
     18821:20100302:123138.143 Processing request.
     18821:20100302:123138.143 Requested [net.tcp.service[ssh]]
     18821:20100302:123138.144 SSH check error: Cannot connect to [127.0.0.1:22] [Connection refused]
     18821:20100302:123138.144 Sending back [0]
    But sshd at host B listens external IP.

    In configuration (server, agent) - external IP.

    Please, help me.
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Originally posted by uraniumscrap
    I have Zabbix server at host A and Zabbix agent at host B. Zabbix checks sshd at host B:

    Code:
     18821:20100302:123138.143 Processing request.
     18821:20100302:123138.143 Requested [net.tcp.service[ssh]]
     18821:20100302:123138.144 SSH check error: Cannot connect to [127.0.0.1:22] [Connection refused]
     18821:20100302:123138.144 Sending back [0]
    But sshd at host B listens external IP.

    In configuration (server, agent) - external IP.

    Please, help me.
    You are obviously checking SSH with:
    Code:
    net.tcp.service[ssh]
    that uses 127.0.0.1 by default.

    You can replace it with:
    Code:
    net.tcp.service[ssh,<extenal_IP>]
    You can check documentation for more details : http://www.zabbix.com/documentation/...l/config/items

    Hope this helps
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • bashman
      Senior Member
      • Dec 2009
      • 432

      #3
      Hi,

      I get this error with ssh checks:

      Code:
      Item [<hostname>:ssh.run[test,<hostname>]] error: Cannot connect to SSH server: gethost() failed for address '<hostname>' [Success]
      I don't know if I'm doing it well, I don't want to use the Password so I use Public key Authentication method.

      I have in 'Public key file' field:

      Code:
      /home/zabbix/.ssh/id_rsa.pub
      and in the 'Public key file' field:

      Code:
      /home/zabbix/.ssh/id_rsa
      Is this correct?
      978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        I only got it to work when I used password.
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • bashman
          Senior Member
          • Dec 2009
          • 432

          #5
          Originally posted by bashman
          I only got it to work when I used password.
          I got it to work with public key:

          Public key file: "id_rsa.pub" instead of the full path.
          Private key file: "id_rsa" instead of the full path.
          978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

          Comment

          Working...