# SSH Server

The SSH Server connection lets your assignments connect to remote Linux or Unix servers and execute shell commands over SSH. Provide your server credentials, and Duvo handles the connection so assignments can retrieve data, run scripts, and check system health without manual logins.

## Setup

### Prerequisites

* An SSH-accessible server (Linux, Unix, or any host running an SSH daemon).
* A user account on the target server with the permissions your assignment needs.
* Either a password or a PEM-encoded private key for authentication.
* If connecting through a bastion host, the same credentials for the jump server.

### Required Permissions

* The SSH user account must have shell access on the target server.
* Grant only the minimum permissions the assignment needs. Avoid using root or highly privileged accounts unless the workflow specifically requires it.
* If using key-based authentication, the public key must be added to the user's `authorized_keys` file on the server.

### Connection Fields

| Field        | Description                                 |
| ------------ | ------------------------------------------- |
| **Host**     | Hostname or IP address of the target server |
| **Username** | SSH user account to authenticate with       |

### Optional Fields

| Field                           | Description                                                            |
| ------------------------------- | ---------------------------------------------------------------------- |
| **Port**                        | SSH port on the target server (defaults to 22)                         |
| **Password**                    | Password for the user account (provide either password or private key) |
| **Private Key**                 | PEM-encoded private key (provide either password or private key)       |
| **Private Key Passphrase**      | Passphrase to decrypt an encrypted private key                         |
| **Jump Host**                   | Hostname or IP of a bastion/jump server for two-hop connections        |
| **Jump Port**                   | SSH port on the jump host (defaults to 22)                             |
| **Jump Username**               | User account on the jump host (required when a jump host is set)       |
| **Jump Password**               | Password for the jump host (provide either password or private key)    |
| **Jump Private Key**            | PEM-encoded private key for the jump host                              |
| **Jump Private Key Passphrase** | Passphrase to decrypt the jump host private key                        |

## Capabilities

* **Execute shell commands** — Run any shell command on the remote server and capture stdout, stderr, and exit codes.
* **Read server data** — Retrieve logs, configuration files, and system status information directly from the source.
* **Trigger remote processes** — Start scripts, batch jobs, or server-side operations as part of an end-to-end workflow.
* **Check system state** — Query running processes, disk usage, service availability, or any other system metric.
* **Connect through bastion hosts** — Reach servers behind firewalls by routing through a jump host with two-hop SSH tunneling.

## Key Benefits

* **Replace manual SSH sessions** — Governed, repeatable automation instead of ad-hoc terminal logins.
* **Access data at the source** — Pull logs, configs, and system metrics directly from servers without intermediate exports.
* **Flexible server coverage** — Works with any server that exposes an SSH endpoint, regardless of operating system or cloud provider.
* **Secure credential handling** — Supports both password and key-based authentication, with optional passphrase protection for private keys.
* **Bastion host support** — Reach servers in private networks through jump hosts without exposing them directly.

## Works Well With

* **Slack or Microsoft Teams** — Post command output, log excerpts, or system alerts to team channels after SSH commands run.
* **Google Sheets or Microsoft Excel** — Write retrieved server data into spreadsheets for tracking, analysis, or reporting.
* **Gmail or Microsoft Outlook** — Send automated notifications with server output or status summaries via email.
