Guys,
I have installed the Zabbix 1.8.5
at Ubuntu Server 11.04 by the
source code, with the option
--with-ssh2; so I tried use the
ssh agent to get data from a
remote server; but I always
had the same result: "Not
supported" with the error:
"Failure obtaining authentication
methods".
So, I have looked at the source
code and found this error in
the file "checks_ssh.c".
The error: "Failure obtaining authentication
methods" is caused by the line
if (NULL != (userauthlist = libssh2_userauth_list(session, item->username, strlen(item->username))))
It always returns NULL in any situation.
To solve this I romeve the "if", except by
the line "auth_pw |= 1;"; in this way
I new error rises, wich was:
"Authentication by password failed".
This error is caused by the line
if (0 != libssh2_userauth_password(session, item->username, item->password))
That always return a negative number
in any situation, even when the ssh
user and password are both correct.
To solve this I removed all content
inside the "if (auth_pw & 1)", leaving only
"libssh2_userauth_password(session, item->username, item->password);"
With these changes the ssh agent
works, but obviously this is not a
good solution.
Does somebody have the same problem
and solved it from a better way?
Thanks in advance.
I have installed the Zabbix 1.8.5
at Ubuntu Server 11.04 by the
source code, with the option
--with-ssh2; so I tried use the
ssh agent to get data from a
remote server; but I always
had the same result: "Not
supported" with the error:
"Failure obtaining authentication
methods".
So, I have looked at the source
code and found this error in
the file "checks_ssh.c".
The error: "Failure obtaining authentication
methods" is caused by the line
if (NULL != (userauthlist = libssh2_userauth_list(session, item->username, strlen(item->username))))
It always returns NULL in any situation.
To solve this I romeve the "if", except by
the line "auth_pw |= 1;"; in this way
I new error rises, wich was:
"Authentication by password failed".
This error is caused by the line
if (0 != libssh2_userauth_password(session, item->username, item->password))
That always return a negative number
in any situation, even when the ssh
user and password are both correct.
To solve this I removed all content
inside the "if (auth_pw & 1)", leaving only
"libssh2_userauth_password(session, item->username, item->password);"
With these changes the ssh agent
works, but obviously this is not a
good solution.
Does somebody have the same problem
and solved it from a better way?
Thanks in advance.