For the complete documentation index, see llms.txt. This page is also available as Markdown.
FaqCd

SSH and WinRM FAQs

Answers to common questions about SSH and WinRM deployments in Harness.

This page answers common questions about SSH and WinRM deployments in Harness.


Secrets and connectors

How are Harness secrets tied to a connector, and what should I watch for?

Connectors are often tied to a secret, such as a password or an SSH key, that can expire. An expired secret is a common cause of execution failures that surface as connector errors. Rotate the secret before it expires to avoid deployment failures.

Is it possible to use EdDSA keys with Harness Git?

Yes, Harness supports the ed25519 key. Use the following command to generate the key:

ssh-keygen -t ed25519 -b 256 -f /Users/test/Documents/temp/edd -m pem

Deployment configuration

How do I deploy an Azure Spring Apps JAR using Harness CD?

Use an SSH deployment and include a step to download the JAR.

Does Harness support SSH deployments using the GCP connector, like it does for AWS and Azure?

No, this feature is not supported. Use an SSH key, or a user name and password, with a data center connector as an alternative.

Can I use the Command step in a Custom stage?

No, the Command step is only applicable in SSH and WinRM type deployments, so it is not supported in a Custom stage.

Is there a way to implement a percentage-based rolling strategy for Shell Script hosts?

For a rolling strategy, you specify the number of instances to deploy per phase. If you have multiple target hosts in a stage and want to deploy a certain proportion of instances per phase, you can configure the number of instances per phase as either a count or a percentage. For more information, go to SSH and WinRM deployments.

Does Harness support automatic rollback for SSH and WinRM deployment types?

No. Write a custom script that retrieves the previous version and creates a new forward deployment with the required version of the artifact and the manifest.

How do I reference privateIp for an EC2 instance in an SSH type deployment?

Use <+instance.properties.privateIp> to reference the private IP. All available variables under instance properties follow the same pattern. Print <+instance.properties.*> to confirm the full list.

Does Harness create the target directory for config file copy or artifact download if it does not exist?

No. Harness does not create the directory if it does not exist. Ensure that the path you provide already exists on the target host.


Service licensing

How does Harness detect service licenses for SSH deployments?

For more information, go to Service licensing for CD.


Command step errors

Why am I getting the error "Host information is missing in Command Step"?

The error message is:

If you use the Command step, the Repeat looping strategy is required. This error indicates that the Command step ran without a Repeat looping strategy. To fix this, set the Repeat looping strategy for the Command step. For more information on the Command step and the supported looping strategies, go to SSH and WinRM.


WinRM configuration and troubleshooting

Why is downloading an artifact for WinRM from Nexus not working when the Windows machine is behind a proxy?

Nexus is supported. Use a custom PowerShell script similar to the following:

How do I give a user access to WinRM resources?

Run the command winrm configSDDL default. This opens a dialog box where you can check whether the user configured for login is already present, and add the user if it is not.

How do I enable certificate authentication for WinRM?

Certificate authentication is disabled by default. Run the following command to enable it:

How do I fix the error "Socket Connection Failed for url windowshost on port 5985"?

Check whether port 5985 is open, and test communication for WinRM on that port.

Can I create a WinRM credential using Terraform?

Yes. Automate creating a WinRM credential or secret key using the Harness Secrets API.

How do I install artifacts on IIS on a Windows VM?

Use the Copy or Download command option. Create a WinRM connection and deploy the artifact to the Windows VM.

Is it possible to add multiple realms when configuring WinRM using Kerberos?

No. You can provide only one realm per WinRM credential. To add more realms, create additional WinRM credentials.

Why is WinRM execution failing with the error below?

The error message is:

Check whether the Windows machine is behind a proxy, and configure the same proxy on the delegate host.

Last updated

Was this helpful?