> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/troubleshooting-and-resources/iacm-fips-ssh-git-requirements.md). Agents can also search and read this documentation through its [MCP server](https://developer.harness.io/~gitbook/mcp).

# FIPS-mode requirements for SSH Git operations

Understand how FIPS-mode nodes affect SSH Git operations in IaCM and CI, and how to avoid SSH key exchange failures.

This page describes how FIPS-mode nodes affect Git operations over SSH in Harness IaCM and Harness CI, the limitations that currently apply, and options that avoid SSH key exchange. Go to the [IaCM FAQ](https://developer.harness.io/infrastructure-as-code-management/troubleshooting-and-resources/faq.md) for answers to other common IaCM questions.

## What you will learn from this topic

* How to recognize a FIPS-related SSH key exchange failure
* Which IaCM behaviors currently apply to SSH module sources
* Which options avoid SSH key exchange

***

## Recognize the failure

When your pipeline runs on nodes with FIPS mode enabled, a step that connects to a Git provider over SSH can fail during key exchange. The step log can include an error similar to the following:

```
kex_gen_client: Key exchange type c25519 is not allowed in FIPS mode
```

This error can appear in the following places:

* The IaCM plugin, when OpenTofu or Terraform downloads a module whose source uses SSH, for example `git::git@github.com:my-org/my-module.git`.
* Clone and lite-engine steps that use an SSH connector, such as the steps that run during **Prepare Execution**. These steps can fail without a visible error in the step log.

The error means the SSH client on the node rejected the default key exchange algorithm.

***

## Review current limitations

The following behavior applies to the IaCM plugin when it fetches modules over SSH:

* The plugin uses the OpenSSH default key exchange and host key algorithms. IaCM currently does not expose a setting for `KexAlgorithms` or `HostKeyAlgorithms`.
* When an SSH key is supplied to the plugin, the plugin sets the `GIT_SSH_COMMAND` environment variable itself and replaces any value you set. Setting `GIT_SSH_COMMAND`, or an environment variable intended to change the key exchange algorithms, on the workspace or step currently has no effect on module downloads.
* SSH key exchange failures on FIPS nodes are not limited to IaCM. Clone steps that use an SSH connector can be affected in the same way.

***

## Avoid SSH key exchange

Because the plugin does not currently let you change the algorithms, you can avoid the failure by keeping SSH key exchange out of the affected step. These options avoid SSH key exchange in the plugin. Harness has not verified them against every FIPS configuration, so test them on your own nodes.

* **Use an HTTPS module source:** Change the module source from an SSH address such as `git::git@github.com:my-org/my-module.git` to an HTTPS address such as `git::https://github.com/my-org/my-module.git`. Git credentials for HTTPS sources depend on your provider and your workspace configuration.
* **Fetch the module before the IaCM step:** Download the module in an earlier step of the pipeline, using a tool or SSH configuration that your FIPS nodes accept, and reference the local copy as the module source.
* **Use an HTTPS Git connector for clone steps:** If your clone steps use an SSH connector, use an HTTPS connector instead, which does not use SSH key exchange.

***

## Report an affected setup

If you see this failure, contact Harness Support and include the following:

* The full step log, including the `kex_gen_client` error.
* The module source address or Git connector type that the step uses.
* The operating system and FIPS configuration of the node that runs the step.

***

## Related concepts

Go to [Connectors and variable sources](https://developer.harness.io/infrastructure-as-code-management/platform/iacm-connectors-variables/connectors-variables.md) to review how a workspace uses connectors and environment variables, or go to the [IaCM FAQ](https://developer.harness.io/infrastructure-as-code-management/troubleshooting-and-resources/faq.md) for answers to other common questions.
