Metadata-Version: 2.5
Name: ssh-over-sse
Version: 0.1.0
Summary: Use SSH through an HTTPS gateway with a local CLI, a gateway, or both
Requires-Python: >=3.12
Provides-Extra: all
Requires-Dist: ssh-over-sse-cli==0.1.0; extra == 'all'
Requires-Dist: ssh-over-sse-gateway==0.1.0; extra == 'all'
Provides-Extra: cli
Requires-Dist: ssh-over-sse-cli==0.1.0; extra == 'cli'
Provides-Extra: gateway
Requires-Dist: ssh-over-sse-gateway==0.1.0; extra == 'gateway'
Description-Content-Type: text/markdown

# ssh-over-sse

Use your usual SSH commands through an HTTPS gateway. Install **ssh-sse-cli** on
your computer and **ssh-sse-gateway** on a host that can reach your SSH servers.

## Install

Requires Python 3.12 or newer and OpenSSH. The client supports Linux and macOS.
The gateway needs `ssh-keygen` available.

Choose the commands you need with pip:

| Install | Commands |
| --- | --- |
| `pip install 'ssh-over-sse[cli]'` | `ssh-sse-cli` |
| `pip install 'ssh-over-sse[gateway]'` | `ssh-sse-gateway` |
| `pip install 'ssh-over-sse[all]'` | Both |

`ssh-over-sse[cli,gateway]` also installs both. Select an option when installing;
the base package alone does not install commands.

Or use uv to install either command as a tool:

```sh
uv tool install --python 3.12 ssh-over-sse-cli
uv tool install --python 3.12 ssh-over-sse-gateway
```

Supported keys are Ed25519, RSA (2048–8192 bits), and ECDSA (P-256, P-384, P-521).
Your private key stays on your computer. Load encrypted keys into `ssh-agent`
before connecting.

## Connect

Ask your administrator for the gateway URL and an allowed SSH destination.
Add an entry to your SSH configuration using your own values:

```sshconfig
Host my-server
    HostName 192.0.2.20
    Port 22
    User alice
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
    StrictHostKeyChecking yes
    ProxyCommand ssh-sse-cli --url https://gateway.example.com --ssh-host %n
```

The client reads the destination, port, user, and identity from that host entry.
Use the gateway's root URL; no additional path is needed.

Connect and transfer files normally:

```sh
ssh my-server
scp report.txt my-server:report.txt
sftp my-server
rsync -e ssh report.txt my-server:report.txt
```

Your public key must be authorized by both the gateway and destination server.
Verify the destination's host key before your first connection.

## Check gateway access

Open the gateway URL in a browser to see its landing page, then check your key:

```sh
ssh-sse-cli --url https://gateway.example.com check
```

The default identity is `~/.ssh/id_ed25519`. Select another key with `-i`, or use
`--ssh-host my-server` to read its identity from your SSH configuration:

```sh
ssh-sse-cli --url https://gateway.example.com -i ~/.ssh/id_ecdsa check
ssh-sse-cli --url https://gateway.example.com --ssh-host my-server check
```

Success prints `Gateway SSH key authentication succeeded.` and exits with status
0. Failure exits with status 1. This checks gateway access; destination access is
verified when you connect. Direct backend key checks also accept an HTTP URL.
SSH connections use HTTPS.

## Run a gateway

Save your public HTTPS URL and allowed destinations in
`~/.config/ssh-over-sse/gateway.yaml`:

```yaml
server:
  audience: https://gateway.example.com
  listen: 0.0.0.0:7010
  ingress_network_restricted: true
targets:
  - host: 192.0.2.20
    ports: [22]
    ssh_users: [alice]
```

Authorize users' public keys in the gateway account's `~/.ssh/authorized_keys`.
Restrict the configuration file to its owner. Limit backend access to your trusted
network before setting `ingress_network_restricted: true`.

Validate the configuration, then start:

```sh
ssh-sse-gateway --check-config
ssh-sse-gateway
```

With OCI providing HTTPS, the gateway uses plain HTTP on port **7010** and needs
no TLS certificate. The default listener is `127.0.0.1:7010`; the example above
accepts ingress on all interfaces.

## Help

```sh
ssh-sse-cli --help
ssh-sse-gateway --help
```

Release notes are in `CHANGELOG.md`.
