Create config

gvm-cli tls --hostname --port 9390 --gmp-username $username --gmp-password $password -X “<get_configs config_id=‘8715c877-47a0-438d-98a3-27c7a6ab2196’/>”
the get_configd_response:
<get_configs_response status=“200” status_text=“OK”>NEWTESTING<creation_time>2019-08-13T19:58:15+08:00</creation_time><modification_time>2019-08-13T19:58:15+08:00</modification_time>1<in_use>1</in_use>Everything<user_tags>0</user_tags><family_count>200</family_count><nvt_count>27241</nvt_count>0first=1 rows=1000 sort=namefirst=1rows=1000sort=namenameascending<config_count>911</config_count></get_configs_response>

When I create a new config:
gvm-cli tls --hostname --port 9390 --gmp-username $username --gmp-password $password -X “<create_config><get_configs_response>NEWTESTING<creation_time>2019-08-13T19:58:15+08:00</creation_time><modification_time>2019-08-13T19:58:15+08:00</modification_time>1<in_use>1</in_use>Everything<user_tags>0</user_tags><family_count>200</family_count><nvt_count>27241</nvt_count>0first=1 rows=1000 sort=namefirst=1rows=1000sort=namenameascending<config_count>911</config_count></get_configs_response></create_config>”
the result is OSError: Connection was closed by remote server

Is openvasmd/gvmd serving our Greenbone Management Protocol via TLS on port 9390? Neither TLS or SSH connections work out of the box without using a Greenbone appliance. Also only OpenVAS 9 and GVM 10 are supported by gvm-tools.

1 Like

Is Socket Connection just supported by GVM10?

No but you have to do the setup for the TLS and SSH connections by yourself. We don’t provide it out of the box.

I have installed openvas9 (gvm-lib 10 ,gvmd 8) on Centos7 , then try to connect from another OS with following command to openvas
]$ gvm-cli ssh --xml test.xml --hostname --ssh-user testgvm --ssh-password 123456
but this error is shown
“Remote closed the connection”

As I wrote you need to create the setup for connecting to gvmd over a ssh connection by yourself. Currently you are just creating a ssh connection.

1 Like

How should I do it?
Is the guidance for that?

I have a trial version of gsa and TLS os working without ant configuration but SSH getting connection closed errors. It would be great if this topic could be addressed with some general guidance