---
title: SSH
description: Monitor SSH connectivity and SFTP latency.
breadcrumbs: Docs > Integrations > SSH
---

# SSH
Supported OS Integration version4.8.0
## Overview{% #overview %}

This check lets you monitor SSH connectivity to remote hosts and SFTP response times.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The SSH/SFTP check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package. No additional installation is needed on your server.

### Configuration{% #configuration %}

{% tab title="Host" %}
#### Host{% #host %}

To configure this check for an Agent running on a host:

1. Edit the `ssh_check.d/conf.yaml` file in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files.md#agent-configuration-directory). See the [sample ssh_check.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/ssh_check/datadog_checks/ssh_check/data/conf.yaml.example) for all available configuration options:

   ```yaml
   init_config:
   
   instances:
     - host: "<SOME_REMOTE_HOST>" # required
       username: "<SOME_USERNAME>" # required
       password: "<SOME_PASSWORD>" # or use private_key_file
       # private_key_file: <PATH_TO_PRIVATE_KEY>
       # private_key_type:         # rsa or ecdsa; default is rsa
       # port: 22                  # default is port 22
       # sftp_check: False         # set False to disable SFTP check; default is True
       # add_missing_keys: True    # default is False
   ```

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent) to start sending SSH/SFTP metrics and service checks to Datadog.

{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations.md) for guidance on applying the parameters below.

| Parameter            | Value                                                        |
| -------------------- | ------------------------------------------------------------ |
| `<INTEGRATION_NAME>` | `ssh_check`                                                  |
| `<INIT_CONFIG>`      | blank or `{}`                                                |
| `<INSTANCE_CONFIG>`  | `{"host": "%%host%%", "port":"22", "username":"<USERNAME>"}` |

{% /tab %}

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information) and look for `ssh_check` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **sftp.response\_time**(gauge) | The response time of SFTP*Shown as second* |

### Events{% #events %}

The SSH Check does not include any events.

### Service Checks{% #service-checks %}

**ssh.can\_connect**

Returns `CRITICAL` if the Agent check is unable to connect to the SSH host. Returns `OK` otherwise.

*Statuses: ok, critical*

**sftp.can\_connect**

Returns `CRITICAL` if the Agent check is unable to connect to the SFTP host. Returns `OK` otherwise.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
