Using Sudo over ssh proxy (workaround)

The customer wants to use sudo over an ssh proxy server at the moment the function is not in the product.

Environment:
This has been tested in Cousteau R2

Actual Behaviour:

The customer forced the connection to the proxy by removing the SSH connection type from the list is locations. The system has been granted the ability to run all commands including sudo. The customer noticed that there where a number of feilds in the database that where not being populated. This would be the Memory, Manufacture etc.

The customer receives an error message:
No usable issue stored in the context, unable to resolve filename 'DMI.jpg'

# dmidecode 2.12
/dev/mem: Permission denied [exit=]
/Scan-10.77.4.176/[00247][10.77.4.176] <DeviceScanning> A(Unix Variant).S(Unix Variant ~ Linux - Physical Memory dmidecode (NIX)) - ERROR - STRATEGY-FAIL:Strategy failed (audit=UNIX@DS.20:LinuxPhysicalMemoryDmidecode)
iQuate.iQSonar.SDK.Connections.Failure: [IQ/X00000] Unknown Error Code: Response: exit status=[1]
# dmidecode 2.12

Tested via an internal scan using sudo works fine over SSH but SSH Proxy we don't have an option.

Step-by-step guide


  • Disable ssh and telnet connections at the location level

        

  • Create two credentials in Locations > Credentials

ssh proxy credential:

Credential Type: SSH Proxy

The Proxy command : ssh -t -l {username} -o StrictHostKeyChecking=no {target} 'sudo -i'



Unix Linux Credential:


Child  Credential: The ssh proxy Credential

Create project select appropriate Location, Targets, Connections, Adapters and Credentials.

Start Project

Project Results Example:

Target log Example: