Disable OpenSSH on Windows servers
Use OneFuse Scripting to uninstall OpenSSH from Windows servers via a bastion host
3 minute read
The OneFuse Scripting Module allows users to consume scripts as API-based services that are executed in context of a specific machine lifecycle (create/destroy) or independently on any SSH-based host.
The OneFuse Scripting Module allows OneFuse admins to create simple API-based services using Scripting policies that can connect to SSH-enabled hosts/devices, track the outputs as inventory items, and enable create/destroy for lifecycle support.
End users of automation tools such as VMware Aria Automation, Terraform, ServiceNow, and others can execute these Policies and consume the variable outputs. This allows you to drive your automation use cases simply and securely, without requiring direct access to the target host.
Create a Module Credential for the selected technology.
Use the OneFuse API to retrieve this JSON output to view in an API browser or use it in a custom node.js application.
Provision and deprovision using Scripting with the OneFuse API or an Upstream Provider. Follow the steps below to set up provisioning and deprovisioning in OneFuse.
OneFuse supports asynchronous Scripting Deployment. To view Job Status, make a polling request via the API.
| Field | Description |
|---|---|
| Scripting Policy Name | Enter a name for the Scripting Policy. |
| Description | Optional description for this Scripting Policy. |
| Target Host | Define the target host on which to run scripts. |
| Module Credential | Select an existing Module Credential. Type to filter. |
| Field | Description |
|---|---|
| Launch Command | Launch command to run the script on the target host. Reference the rendered script with {{ ScriptName }}. |
| Script Template | Enter the script using a mix of static and templated text to run on the target host. |
| Success Exit Code(s) | Enter success exit codes as comma-separated numbers. Success is determined by matching the exit code(s) against the script’s exit code. |
Use OneFuse Scripting to uninstall OpenSSH from Windows servers via a bastion host
Use OneFuse Scripting to install packages with Chocolatey on Windows servers
Use a bastion host to execute PowerShell scripts via the OneFuse Scripting Module
Capture JSON output from OneFuse Scripting policies