Creating RHEL asset with imported SSH key using Safeguard-PS

Dear Support, community

What we'd need to do is importing (creating) a new Red Hat (RHEL) asset in Safeguard, using Safeguard-PS (because we're speaking of numbers in the hundreds here, so we can't do it manually through the GUI.

We have already used Safeguard-PS before to automate the onboarding of new Oracle Assets using a password and this worked great! However, I'm having a bit of a trouble with onboarding the RHEL assets because of the following issues:

When importing through the GUI, I need to select the option "Import an SSH Key that I will deploy myself" because the service account has been created on the target systems with a specific key. When using this option, you need to give the service account name, then have to import the ppk (private key file) and enter the password for this ppk file. I can't figure out how to use this type of Asset creation though Safeguard-PS or how I could automate it for mass importing.

I have searched the forums before posting this but I can't seem to find any entries with this specific question / issue. I have gotten this far with the safeguard-ps command:

New-SafeguardAsset -DisplayName "example RHEL server" -Description "Access to the Linux server example RHEL server" -AssetPartition "Linux" -Platform "RHEL" -ServiceAccountCredentialType "SSH Key" -ServiceAccountName "pam001s" -ServiceAccountSecretKey "[PPK contents pasted here in plain text]" -ServiceAccountPassword "ExamplePassword123 [password of the PPK file]" -NetworkAddress "ExampleRHEL.corporate.company" -NoSslEncryption

Can you please give some pointers on how to mass-import using the option "Import an SSH Key that I will deploy myself"?

Thanks!

Robert Devald

Parents Reply
  • Hi Tawfiq

    Thanks for your quick response! We run 7.0.2.1 LTS so I have tried with the CSV method as well just now, but the CSV import still goes through Safeguard-PS and I'm still missing the parameters to specify that I want to onboard the Asset with a service account that has an existing key (with a password). Is there no parameter that exists for this?

    Or should we do it in two steps where:
    1) We onboard all the desired assets with no service account (or any accounts for that matter)
    2) We onboard all the service accounts separately with the New-SafeguardAssetAccount command (I created a template for this one and with this one I also don't seem to have the needed parameters for this). I also checked New-SafeguardDirectoryAccount parameters and can't see the option here either.

    Am I missing something crucial here? Or is it not possible to add assets with service accounts with existing SSH keys through Safeguard-PS?

    Thanks!

    Robert

Children
No Data