Gvm connection

python
python-gvm

#1

hi
i using this code to connect to the server but its not working

x=gvm.connections.SSHConnection(hostname=‘192.168.29.130’,port=22,username=‘root’,password=‘toor’)
transform=EtreeCheckCommandTransform()
gmp=Gmp(x)
gmp.authenticate(username=‘admin’,password=‘123’)
gmp.get_version()

and give me this error gvm.errors.GvmError: Remote closed the connection
please help me how i can use ssh connection


How to connect to remote OpenVas scanner with python?
#2

I am trying to connect a remote scanner using python-gvm api. I have tried using SSH but its not working, I have added complete details on stackvoerflow link. Can somebody please help ?

I am looking for scanner which can be managed by API using python or java.


#3

Connecting via SSH only works out-of-the-box with a Greenbone Appliance. For the GSE you have to figure out how to setup up SSH by yourself.

Btw. you can’t connect to the scanner directly. With GMP you are always creating connections to the management daemon.