Scan script doesn't work

hi I’m trying to use this script “” present in the example scripts on github in this link.

using this command which is suggested:
$ gvm-script --gmp-username name --gmp-password pass ssh --hostname scripts / <host_ip>

where “name” and “pass” are replaced by my greenbone username and password and in place of <host_ip> I put the ip of my host.

Using this command the terminal returns
“zsh: non-existent file or directory: gsm”

If instead I remove that “gsm” I get this:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/gvmtools/”, line 88, in main
with protocol_class(connection, transform=transform) as protocol:
File “/usr/lib/python3/dist-packages/gvm/protocols/”, line 117, in enter
gmp = self.determine_supported_gmp()
File “/usr/lib/python3/dist-packages/gvm/protocols/”, line 99, in determine_supported_gmp
version_str = self.determine_remote_gmp_version().split(‘.’, 1)
File “/usr/lib/python3/dist-packages/gvm/protocols/”, line 82, in determine_remote_gmp_version
File “/usr/lib/python3/dist-packages/gvm/protocols/”, line 107, in connect
File “/usr/lib/python3/dist-packages/gvm/”, line 348, in connect
File “/usr/lib/python3/dist-packages/gvm/”, line 331, in _ssh_authentication
raise GvmError(
gvm.errors.GvmError: Something went wrong with reading the known_hosts file: [Errno 2] No such file or directory: ‘/home/marco/.ssh/known_hosts’

In addition there are also 2 reported problems namely:
gmp is not defined
args is not defined

Can anyone please help me?

I tested this on my latest with 22.4, and it seems to work, but the docs seem a little out …

/usr/local/bin/gvm-script --gmp-username admin --gm
p-password admin tls --hostname /scripts/                                                 
        This script starts a new scan on the given host.                                                                                  
        It needs one parameters after the script name.                                                                                    
        1. <host_ip>        IP Address of the host system                                                                                 
        2. <port_list_id>   Port List UUID for scanning the host system.                                                                  
                            Preconfigured UUID might be under                                                                             
                            ex. iana-tcp-udp is                                                                                           
            $ gvm-script --gmp-username name --gmp-password pass ssh --hostname <gsm> scripts/ <host_ip> <port_list_

The docs from the script say it needs “one” parameter, and then lists two. My XP is that it needs both.

Also, it looks like you left out the hostname after the “–hostname”. If you are running this from the same host as your gvmd, then you should be able to use “” as I did. Otherewise, the IP where your gvmd is running. Also note, I have gvmd listening on a tcp port, so I’m using the tls method vs the ssh method.


sorry I misspelled the command, I used this:
$ gvm-script --gmp-username name --gmp-password pass ssh --hostname scripts <host_ip> <port_list_id>

where I replace name, pass, gsm, host ip and port list.

before I had also left " \ " after “password pass” … now when I execute the command written above it appears this:

gvm-script: error: the following arguments are required: CONNECTION_TYPE
unknown option - -
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
[-b bind_address] [-c cipher_spec] [-D [bind_address:] port]
[-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
[-i identity_file] [-J [user @] host [: port]] [-L address]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q query_option] [-R address] [-S ctl_path] [-W host: port]
[-w local_tun [: remote_tun]] destination [command [argument …]]

I state that I am doing this on kali linux installed on virtual box, from windows 10 … my windows ip is therefore different from the ip I have on kali linux.

You need to set a connection type. Please take a look at the gvm-script --help output and the documentation of gvm-tools. For more info about the connection types you can take a look at Connection Types - gvm-tools