> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH Connections

> Run commands on remote hosts you control

SSH connections let Neo connect to remote hosts you own or are authorized to test, such as a bastion, jump box, scanner VM, or staging server. After a host is saved, you can refer to it by name in a task and ask Neo to run commands through that connection.

## Sandboxes and SSH

[Sandboxes](/concepts/sandboxes) and SSH connections are used for different kinds of execution:

* A **Neo sandbox** is Neo's persistent execution workspace. It can be a Neo-managed cloud sandbox, when included in your plan, or a self-hosted sandbox installed on infrastructure you control.
* A **remote SSH connection** is a user-provided machine. When Neo uses SSH, commands run on that remote host, not inside the Neo sandbox.

Use a self-hosted sandbox when Neo's workspace, terminal, files, and tools should run on a host you control. Use SSH when Neo only needs targeted command execution on an existing remote system, such as checking logs or validating a fix.

See [VPN, SSH, or BYOS](/concepts/sandboxes#vpn-ssh-or-byos) for how SSH compares to VPN and BYOS across network position, tooling, and use case.

## Setup

1. Open [**Settings > SSH**](https://neo.projectdiscovery.io/task?settings=ssh).
2. Click **Add SSH Host**.
3. Enter the host name, `user@host`, port, and authentication method.
4. Choose **Generate new key**, **Use existing private key**, or **Password**.
5. If using a generated key, run the setup command on the remote host.
6. Click **Test connection** before using it in a task.

**Generate new key** lets Neo create a new SSH key pair for the connection. Run the setup command on the remote host to allow Neo to connect.

**Use existing private key** lets you use a private key you already have, such as a `.pem` file for a cloud VM, bastion host, scanner VM, or staging server. Add the private key and, if required, its passphrase.

**Password** uses an SSH password for the connection.

After Neo connects to the remote host, commands run on that host. If the host has access to private networks, Neo can run from that network position.

## Example prompts

```text theme={"system"}
Use the prod-bastion SSH connection to check which internal web services are reachable from that subnet.
```

```text theme={"system"}
SSH into staging-app-01 and collect auth logs, listening ports, running services, and recent deploy metadata.
```

```text theme={"system"}
Use scanner-vm to run nuclei against the authorized internal inventory. Stay within the provided scope.
```

## Common workflows

* Internal recon from a trusted scanner VM or jump box
* Incident response evidence collection from an affected host
* Post-remediation checks for patches, firewall rules, service config, and package versions
* Segmentation testing from a real subnet position
* Kubernetes or container host inspection from an authorized admin machine
* Red team workflows that require an authorized foothold or bastion

<Warning>
  Only save hosts that Neo is allowed to access. Commands run over SSH affect the remote machine you configured.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.