External connect python-gvm over SSH

Hello, i need to develop python script and execute it from another server

How i can connect python-gvm lib over SSH to Greenbone community docker container?
Default compose config dont exposing 22 port

I solved the problem by enabling listening to the API port 9390 and switching gsad to it, instead of the unix socket
And now we will be able to connect using the TLSConnection method (Unfortunately, I did not understand what is required for the SSHConnection method to work)

This steps worked for me:

Add to gvmd section of docker-compose.yml

    ports:
      - 9390:9390
    environment:
      GVMD_ARGS: --port=9390 --listen=0.0.0.0
    command: >
      /bin/bash -c "
      gvm-manage-certs -V ||
      gvm-manage-certs -a;
      /usr/local/bin/start-gvmd
      "

Add to gsa section:

    environment:
      GSAD_ARGS: --mlisten=gvmd --mport=9390 --port 80 --http-only
1 Like