How to use GVM-Tool cmds in Greenbone OS


I am getting below error after executing gvm cli cmd on greenbone OS :
“Socket /run/gvm/gvmd.sock does not exist”

command : gvm-cli --protocol OSP --gmp-username $GmpUsername --gmp-password $GmpPassword socket --xml “<get_configs/>”

I have tried to create gvmd.sock file in greenbone OS but getting “permission denied” error .

Greenbone OS details:
GOS version : 21.04.1

could anyone please help me to resolve this issue

Hello akhilesh,

Greenbone OS is a multi-user system where each user only has permissions for tasks relevant to that user. The GOS administrative user must not be used for vulnerability management tasks, and therefore cannot access gvmd sockets. Please also note that modifying the system by creating additional gvmd sockets is not supported and may cause unintended behaviour.

You can use gvm-cli on the GSM the same way you would use it from an external system, via SSH:

gvm-cli --gmp-username $GmpUsername --gmp-password $GmpPassword ssh --hostname --xml ‘<get_configs/>’

Both the SSH and the GMP service will have to be enabled in the GOS menu Setup > Services.

1 Like

You tried to use the OSP protocol. This is not what you want. You need to use GMP instead. GMP is the protocol for managing the vulnerability data. It is used e.g. for creating task, setting targets, starting scans and getting scan results. OSP is the protocol used to speak with the scanner component only. It doesn’t know anything about tasks or scan configs.


Thank you!