Score:0

How to connect to remote Greenbone Community with a unix socket over ssh?

de flag

I want to use python-gvm to get reports from greenbone. For this I need a ssh connection which listen to a unix socket.

At first I create a test user for the ssh connection. It should use the script shell.sh if I login.

useradd -s /shell.sh test

This is the script:

#!/bin/bash
socat UNIX://var/run/gvm/gvmd.sock -

And this is the local script to test the ssh connection:

import gvm
from gvm.protocols.latest import Gmp
from gvm.transforms import EtreeTransform
from gvm.xml import pretty_print as pp

connection =gvm.connections.SSHConnection(hostname='1.1.1.1', username='test',password='test', port=22)
gmp = Gmp(connection)
gmp.authenticate('admin', 'password')

version = gmp.get_version()
pp(version)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.