Remote control GVM

Hi,

I installed the GVM-20.08 on a fresh Ubuntu 20.04 VM directly from the sources, following this tutorial.

I am trying to control the GVM that runs inside the VM from my host machine. I have installed on my host machine python-gvm and gvm-tools, created a script to get the GMP version from the VM, but I get the following error: gvm.errors.GvmError: Remote closed the connection .

On that stackoverflow link from where I took the python script is stated the same problem. At first I tried with SSHConnection, but I switched to TLSConnection as the mehdi jafartpur user stated, and the error is now ConnectionRefusedError: [Errno 111] Connection refused . A user said that additional setup at the remote server would be required, but he didn’t dive into details.

What’s your experience into remote controlling the GVM? What steps I’ve missed?

Thank you!

I’ve already answered that question at the mentioned Stackoverflow article too. SSH needs some setup on the machine. Search in the forum for advises to use that. Some user has posted steps for the setup.
For using the TLS connection you need to create certificates and change gvmd to run with the certs and listening on a TCP port for accepting TLS connections. To do that you need to adjust the arguments passed to gvmd when it is started. Most likely in some systemd service file. See gvmd --help to take a look at all the parameters.

1 Like

Thank you bricks for your response. I have managed to access the GVM remotely, following this post.

The problem is that proposed solution creates a local socket so I have to use UnixSocketConnection, instead of SSHConnection. I tried to make the ssh work (through SSHConnection) based on this post, but I haven’t managed to make it work. If you any tips, it would be great.