Metadata-Version: 2.4
Name: ssh-to-server
Version: 1.0.0
Summary: A simple CLI tool to SSH into servers from your ~/.ssh/config
Project-URL: Homepage, https://github.com/LucasDaSilva96/Py-SSH
Project-URL: Issues, https://github.com/LucasDaSilva96/Py-SSH/issues
Author: Lucas da Silva Junior
License: MIT
Keywords: cli,devtools,ssh
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: click>=8.1
Requires-Dist: questionary>=2.0
Description-Content-Type: text/markdown

# ssh-to-server

A CLI tool that reads your `~/.ssh/config` and lets you SSH into servers interactively — no need to remember hostnames or IPs.

## Features

- Lists all hosts from `~/.ssh/config`
- Select by number or navigate with arrow keys
- Respects all SSH config settings (`User`, `IdentityFile`, `Port`, etc.)

## Requirements

- Python 3.11+
- OpenSSH (`ssh` binary available in PATH)

## Installation

```bash
pip install ssh-to-server
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install ssh-to-server
```

## Usage

```bash
ssh-to-server
```

You'll see a numbered list of your hosts. Type a number and press Enter, or press Enter to use the arrow-key selector.

## Configuration

The tool reads hosts from `~/.ssh/config` by default. You can override this by creating `~/.config/ssh-to-server/config.toml`:

```toml
[ssh]
config_path = "~/dotfiles/ssh/config"
```

### SSH config format

If you don't have a `~/.ssh/config` yet, here's an example:

```
Host my-server
  HostName 192.168.1.10
  User ubuntu
  IdentityFile ~/.ssh/id_ed25519

Host work-vpn
  HostName vpn.example.com
  User alice
  Port 2222
```

## Development

```bash
git clone https://github.com/LucasDaSilva96/Py-SSH
cd Py-SSH
uv sync
uv run ssh-to-server

# Run tests
uv run pytest

# Lint
uv run ruff check .
```

## License

MIT
