Hi,
I’m having trouble understanding the argument to pass into gmp.create_target() that will add the ssh credentials for creating a target. I’ve tried ssh and ssh_credential. According to the documentation, it should be ssh_credential (I think) and I’m unable to dir or help within gvm-pyshell. Here is my code:
def create_target(gmp, ipaddress, ssh_credential, port_list_id):
name = "Target {}".format(ipaddress)
response = gmp.create_target(
name=name,
hosts=[ipaddress],
ssh_credential=ssh_credential,
port_list_id=port_list_id)
return response.get('id')
Command
- <name>
A name for the target.
- <comment> ?
A comment on the target.
- <copy> ?
The UUID of an existing target.
-
One of
- <asset_hosts>
Hosts from which to create the target.
* @**filter** (text) Filter term that defines the list of hosts.
- <hosts>
A comma-separated list of hosts, which may be empty.
- <exclude_hosts> ?
A list of hosts to exclude.
- <ssh_credential> ?
SSH login credentials for target.
- @id (uuid)
- <port> ?
The port the LSCs will use.
- <ssh_elevate_credential> ?
SSH elevate credentials for target.
- @id (uuid)