Hello everyone, I’m trying to see some way to automate the download of my reports. I wanted to know if there is any way to do this via api, I’ve already tried python-gvm, gvm-cli and gvm-pyshell, where in the latter I used the command gvm-cli --gmp-username USERNAME --gmp-password PASSWORD ssh - -hostname LOCALHOST --xml “<get_version/>” and
gvm-pyshell \ --gmp-username USERNAME --gmp-password PASSWORD ssh \ --hostname LOCALHOST and I only get the return message “gvmtools:SSH Connection failed: Authentication failed”, could someone help me with some tutorial or explanation or any way to automate these reports downloads?
@GabrielPavard well. You don’t need ssh if you are really connecting to “localhost” (same machine).
First you need to understand how the ssh connection is build and configured…
Eero
Hello, I tried with tls connection too and it didn’t work, do you have any code example that there was a connection with greenbone? or some tutorial?
on local host you can use a socket connection, if you have exposed sockets activated.
What OS are you running on?
1 Like
I’m running on linux, my idea would be to do something via api, if there is any token in greenbone, or some way to make a local connection
There should be a gvmd
socket on your local host
- here:
$CMAKE_INSTALL_PREFIX/var/run/gvmd.sock
which you can use in
gvm-cli --gmp-username USERNAME --gmp-password PASSWORD SOCKET --xml ...