my first call
gvm_cli tls --host=localhost --xml="<get_version/>" is successful.
BUT when I try gvm_cli tls --host=localhost --xml="<get_tasks/>"
I get following error:
First command must be AUTHENTICATE, GET_VERSION, COMMANDS.
Thats why I’ve made following ./gvm-cli tls --hostname=localhost --xml=" <authenticate> <credentials><username>test</username><password>test</password> </credentials></authenticate>"
Response 200 OK.
then I’ve tried to call get_tasks one more time.
The same error, that the first command must be authenticate.
I’m confused.
How should I structure my calls.
Most GMP commands need an authentication. The authentication is only valid for the current connection. If the connection is closed the authentication session is closed too.
gvm-tools have command line arguments for handling the gmp authentication out of the box. Please take a look at --gmp-username and --gmp-password arguments.
and try to call
gvm-cli --config="/home/gvmclient/.config/gvm-tools.config" tls --hostname=localhost --xml="<get_tasks/>"
what is wrong in this call or configuration??
@johnbesel were you actually ever able to get this working? I see the answer above is marked as the solution, but I’m having the exact same problem. Using the exact same command from the gvm-tools github (except replacing my username and password) and no luck.