Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Remote SSH scans doesn't work  #237

@bit-sorcerer

Description

@bit-sorcerer

Basic system information:

Fedora 30, Kernel 5.3.11-200.fc30.x86_64
The openscap daemon is installed on the remote server.

While trying to connect to a CentOS 7 machine I get the following error:

15:38:58
info
SCAP Workbench 1.2.0, compiled with Qt 5.11.3, using OpenSCAP 1.3.1
15:39:06
info
Opened file '/usr/share/xml/scap/ssg/content/ssg-centos7-ds.xml'.
15:41:00
info
Establishing connecting to remote target...
15:41:07
error
Can't connect to remote machine! Exception was: There was a problem with SshConnection! Failed to create SSH master socket! Diagnostic info: Starting process '/usr/bin/setsid --wait /usr/bin/ssh -M -f -N -o ServerAliveInterval=60 -o ControlPath=/tmp/5s8Jfb/ssh_socket -p 22 root@10.100.166.10' Starting process '/usr/bin/setsid --wait /usr/bin/ssh -M -f -N -o ServerAliveInterval=60 -o ControlPath=/tmp/5s8Jfb/ssh_socket -p 22 root@10.100.166.10' stdout: =============================== stderr: =============================== Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19439): Gtk-WARNING **: 15:41:00.476: cannot open display: :0 Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19440): Gtk-WARNING **: 15:41:02.784: cannot open display: :0 Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19441): Gtk-WARNING **: 15:41:05.023: cannot open display: :0 Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19442): Gtk-WARNING **: 15:41:07.684: cannot open display: :0 Permission denied, please try again. Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19443): Gtk-WARNING **: 15:41:07.710: cannot open display: :0 Permission denied, please try again. Invalid MIT-MAGIC-COOKIE-1 key (gnome-ssh-askpass:19444): Gtk-WARNING **: 15:41:07.735: cannot open display: :0 Received disconnect from 10.100.166.10 port 22:2: Too many authentication failures Disconnected from 10.100.166.10 port 22

However if I run the dry run i get the following output which works like a charm:

oscap-ssh root@10.100.166.10 22 xccdf eval --datastream-id scap_org.open-scap_datastream_from_xccdf_ssg-rhel7-xccdf-1.2.xml --xccdf-id scap_org.open-scap_cref_ssg-rhel7-xccdf-1.2.xml --profile xccdf_org.ssgproject.content_profile_pci-dss --oval-results --results /tmp/xccdf-results.xml --results-arf /tmp/arf.xml --report /tmp/report.html "/tmp/SCAP Workbench-KbKqWW/ssg-centos7-ds.xml"

Result:

oscap exit code: 2
Copying back requested files...
results.xml 100% 9289KB 43.6MB/s 00:00
results-arf.xml 100% 34MB 85.9MB/s 00:00
report.html 100% 2112KB 57.2MB/s 00:00
%2Fusr%2Fshare%2Fopenscap%2Fcpe%2Fopenscap-cpe-oval.xml.result.xml 100% 82KB 17.6MB/s 00:00
ssg-rhel7-cpe-oval.xml.result.xml 100% 111KB 27.8MB/s 00:00
ssg-rhel7-oval.xml.result.xml 100% 5586KB 72.3MB/s 00:00
Removing remote temporary directory...
Disconnecting ssh and removing master ssh socket directory...
Exit request sent.

Any ideas on what might be going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions