SSH (Certificate Auth)

Use the SSH (Certificate Auth) resource type to connect to Linux hosts using ephemeral, certificate-based SSH authentication issued by the StrongDM Certificate Authority (CA).

Overview

This guide describes how to set up the SSH (Certificate Auth) resource type in StrongDM. Using SSH (Certificate Auth) enables StrongDM to manage secure, just-in-time access to your SSH servers without distributing static credentials. Each connection request triggers StrongDM to issue a short-lived SSH certificate signed by your organization’s CA. Your hosts trust this CA, allowing access only while the certificate is valid.

Some of the benefits of using certificate authentication include the following:

  • Eliminates long-lived SSH keys

  • Enables centralized access control and revocation

  • Simplifies onboarding and offboarding

  • Provides detailed session auditing

Authentication

StrongDM acts as an SSH certificate authority (CA). When a user initiates a session, the following happens:

  • The StrongDM node (gateway, relay, or proxy worker) requests a short-lived SSH certificate from the CA.

  • The CA signs the certificate, embedding the user’s identity and allowed principals.

  • The node uses this certificate to authenticate to the target host.

  • The host verifies the signature using the trusted CA public key.

Each connection is ephemeral, traceable, and scoped to the authenticated StrongDM user.

Prerequisites

Before configuring a host for certificate authentication, ensure the following requirements are met:

  • You have Admin privileges in StrongDM.

  • A StrongDM node can reach the target SSH host over TCP port 22 (or custom port).

  • The host runs a version of OpenSSH that supports TrustedUserCAKeys (OpenSSH 7.2+ recommended).

  • Network firewalls allow SSH connections from your StrongDM node.

  • (Optional but recommended) NTP or clock synchronization is enabled on all hosts, as certificate authentication depends on accurate system time.

To verify that the server you are attempting to add is accessible from your StrongDM node, go to the gateway or relay server and from a command prompt, type ping <YOUR_HOSTNAME>. If your gateway or relay can connect to this hostname, you can continue.

For more information see Gateways and Relays.

Review StrongDM CA Public Key

Each StrongDM organization has a unique SSH Certificate Authority (CA). Hosts must trust this CA’s public key to validate StrongDM-issued certificates.

You can use either:

  • The StrongDM-managed CA (default) called Strong CA

  • A third-party CA if your organization is on the Enterprise plan

The Strong CA is a cryptographic key pair in charge of issuing and validating certificates for every SSH session. You need to add the SSH CA public key as a trusted source on any hosts you want to access with this option. StrongDM CA certificates for SSH have a lifespan of three years.

Organizations that have the Enterprise plan enabled may use an SSH CA issued by a third-party issuer (for example, HashiCorp). Third-party CAs are managed in the same way as the Strong CA.

All SSH CAs available to your organization are listed on the Admin UI's Settings > Secrets Management within the Certificate Authorities tab. Selecting a CA opens that CA's settings, which shows all certificates issued by the CA. Each certificate is identified by a unique fingerprint and the time and date when it was created.

Multiple certificates can exist, but only one can be active at a time. An active certificate is the one configured to authenticate to the resource. The active certificate is highlighted and shown in blue, whereas inactive certificates are shown in gray.

How to view and copy the SSH CA public key

To retrieve your organization’s SSH CA public key, follow these steps.

  1. In the StrongDM Admin UI, navigate to Settings > Secrets Management > Certificate Authorities.

  2. From the SSH CA's Settings tab, select one of the certificates shown, or create a new certificate.

  3. From the SSH Certificate dialog that displays, use the Copy button to copy the SSH CA public key to your clipboard.

  4. Save it locally as /etc/ssh/sdm_ca.pub on each target host.

💡 Tip: Ensure you copy the entire key, including the ssh-rsa or ssh-ed25519 prefix, without extra spaces or line breaks.

If you later rotate your CA, repeat these steps and replace the old key on each host.

Add the StrongDM CA to Your Host

To configure a host to trust the StrongDM CA, follow these steps.

  1. Copy the CA public key to the host and save it:

  2. With your editor of choice, open your SSH daemon configuration for editing. For example:

  3. Add or update the following line:

  4. Restart the SSH service on this host for the changes to take effect. Note that the command you execute may differ based on your system configuration, and you may need to restart sshd or ssh, as in the following example:

Restrict access by username

By default, any Linux username can be used when authenticating via a StrongDM-issued certificate. For tighter control, restrict which usernames are permitted.

Every certificate created by the StrongDM CA contains two principals: the username specified in the datasource settings and the literal string strongdm. You can use the following steps to restrict access to only this user, replacing user-one with your desired username.

The user must already exist (be created or validated externally) before the usernames are added to the authorized principals file.

  1. Create a directory for allowed principals:

  2. Create a file named after the username you wish to allow and include the StrongDM principal inside. For example, using vim:

  3. Update sshd_config to reference this directory:

  4. Restart the sshd service.

Now only users with certificates that include that principal can log in as the specified Linux user.

🔒 For environments with multiple users, create one file per Linux user you wish to allow.

You can find additional ways to restrict access by username in Red Hat's Creating SSH Certificates documentation.

Add the Resource in StrongDM

Once your host trusts the StrongDM CA, add it as a resource in StrongDM. This section provides instructions for adding the resource in either the StrongDM Admin UI, CLI, Terraform provider, or SDKs.

Set up and Manage With the Admin UI

If using the Admin UI to add the resource to StrongDM, use the following steps.

  1. In the Admin UI, go to Resources > Servers.

  2. Click Add server.

  3. For Server Type, select SSH (Certificate Based).

  4. For Connectivity Mode, select either Virtual Networking Mode or Loopback Mode and their related properties.

  5. For Authentication type, choose either Leased Credentials or Identity Aliases and set their properties:

    1. Leased Credentials

      1. For Username, enter the username that the relay should utilize to connect to the server via SSH.

    2. Identity Aliases

      1. For Identity Set, select an Identity Set name from the list.

      2. For Healthcheck Username, enter the SSH user account name (for example, ubuntu).\

  6. Set all other required resource properties to configure how the StrongDM node connects to the server via RDP.

  7. When you are done, click Create to save the resource. Then you may click the resource name to view status, diagnostic information, and setting details.

After the server is created, the Admin UI displays that resource as unhealthy until the health checks run successfully. When the resource is ready, the Health icon indicates a positive, green status.

Resource Properties

Configuration properties are visible when you add a Server Type or when you click to view the server's settings. The following table describes the settings available for your SSH (Certificate Based) server.

Property
Requirement
Description

Display Name

Required

Meaningful name to display the resource throughout StrongDM; exclude special characters like quotes (") or angle brackets (< or >)

Server Type

Required

SSH (Certificate Based)

Proxy Cluster

Required

Defaults to "None (use gateways)"; if using proxy clusters, select the appropriate cluster to proxy traffic to this resource

Hostname

Required

Hostname or IP address to which you are connecting, such as testserver-01.example.org; relay server should be able to connect to your target server or hostname

Port

Required

Port to connect to the resource; default port value 22

Connectivity Mode

Required

Select either Virtual Networking Mode, which lets users connect to the resource with a software-defined, IP-based network; or Loopback Mode, which allows users to connect to the resource using the local loopback adapter in their operating system; this field is shown if Virtual Networking Mode enabled for your organization

IP Address

Optional

If Virtual Networking Mode is the selected connectivity mode, an IP address value in the configured Virtual Networking Mode subnet in the organization network settings; if Loopback Mode is the selected connectivity mode, an IP address value in the configured Loopback IP range in the organization network settings (by default, 127.0.0.1); if not specified, an available IP address in the configured IP address space for the selected connectivity mode will be automatically assigned; this field is shown if Virtual Networking Mode and/or multi-loopback mode is enabled for your organization

Port Override

Optional

If Virtual Networking Mode is the selected connectivity mode, a port value between 1 and 65535 that is not already in use by another resource with the same IP address; if Loopback Mode is the selected connectivity mode, a port value between 1024 to 64999 that is not already in use by another resource with the same IP address; when left empty with Virtual Networking Mode, the system assigns the default port to this resource; when left empty for Loopback Mode, an available port that is not already in use by another resource is assigned; preferred port also can be modified later from the Port Overrides settings

DNS

Optional

If Virtual Networking Mode is the selected connectivity mode, a unique hostname alias for this resource; when set, causes the desktop app to display this resource's human-readable DNS name (for example, k8s.my-organization-name) instead of the bind address that includes IP address and port (for example, 100.64.100.100:5432)

Certificate Authority

Required

Where the credentials for the server are stored; defaults to Strong CA; to learn more, see Certificate Authority options

Key Type

Required

Signing algorithm with default value set to RSA-2048; other options include RSA-4096, ECDSA-256, ECDSA-384, ECDSA-521, and ED25519; to learn more, see Key Type options

Authentication

Required

Select Leased Credentials (default) or Identity Aliases

Username

Required

Displays if Authentication is set to Leased Credentials; enter the username the relay should utilize to connect to the server via SSH (for example, bob.belcher)

Identity Set

Required

Displays if Authentication is set to Identity Aliases; select an Identity Set name from the list

Healthcheck Username

Required

Displays if Authentication is set to Identity Alias; enter the username that will be utilized to verify StrongDM's connection to the server; username must exist on the target server

Allow Port Forwarding

Optional

When enabled, allows SSH connections proxied by StrongDM for this server to accept local forwarding requests; this checkbox is shown when the Allow port forwarding through SSH? option is turned on in the Admin UI security settings; see Port Forwarding for more information

Resource Tags

Optional

Resource Tags consisting of key-value pairs <KEY>=<VALUE> (for example, env=dev)

Certificate Authority options

By default, server credentials are stored in Strong CA. If the Enterprise plan is enabled for your organization, you may use a third-party CA, instead of the default Strong CA, to issue certificates for authentication to your certificate-based SSH resources. For more information, please see Certificate Authorities.

Option
Description

Strong CA (default)

StrongDM automatically generates and signs SSH certificates.

Third-party CA

For Enterprise customers, import and manage your own SSH CA. This allows tighter integration with internal PKI systems.

⚠️ Only one SSH CA can be active per organization. Rotating or replacing the CA immediately invalidates existing sessions.

Key type options

The following table describes the different key types StrongDM can use to encrypt and secure SSH connections.

Key type
Description
Additional information

RSA-2048

2048-bit key generated with RSA algorithm

Lowest security guarantees, but has broad support across hosts

RSA-4096

4096-bit key generated with RSA algorithm

Slightly better than RSA-2048; still uses RSA, but larger keys can prolong the time to crack if an attacker gains access

ECDSA-256

Key generated with 256-bit elliptic curve and ECDSA algorithm

Provides better security guarantees than RSA

ECDSA-384

Key generated with 384-bit elliptic curve and ECDSA algorithm

Slightly better than ECSDA-256

ECDSA-521

Key generated with 521-bit elliptic curve and ECDSA algorithm

Serves as the best ECDSA choice from a security standpoint

ED25519

Key generated with ED25519 algorithm

Provides the best performance and comparable security to ECDSA; much smaller keys, but not as widely supported as other options

Additional Considerations

  • You may have an existing CA key pair and certificate to perform direct SSH or other tasks. You can continue to use this key pair, but you cannot import this CA into StrongDM.

  • You do not need to sign these keys, or any user keys. StrongDM handles that for you and for your users.

  • Session-based certificates for users are automatically renewed every 3 minutes.

Test the Connection

After adding the resource, follow these steps to test the connection.

  1. In the Admin UI, check that the resource shows a healthy status.

  2. From the StrongDM CLI or desktop app, attempt a connection:

  3. Verify access and run a basic command (for example, whoami).

If the resource is unhealthy:

  • Confirm that the host is reachable from a StrongDM node.

  • Verify the CA public key on the host matches your current StrongDM CA.

  • Check system logs (/var/log/auth.log) for certificate or principal errors.

  • Ensure that correct username restrictions are configured.

Help

For more information, please see the documentation:

If you encounter issues, please consult the StrongDM Help Center.

Last updated

Was this helpful?