Skip to main content

Tiny SSH instance manager with JSON inventory and completions

Project description

sshi

sshi is a tiny SSH instance manager that lets you store your cloud/server SSH details in a simple JSON inventory and connect to them quickly.

Features

  • Store SSH instances with name, host, user, port, key, and optional jump host.
  • SSH into servers with sshi <name>.
  • Run remote commands with sshi <name> -- <command>.
  • List all instances with sshi ls.
  • Add or remove instances: sshi add, sshi rm.
  • Show or edit stored entries: sshi show, sshi edit.
  • Quick connectivity check: sshi test <name>.
  • Copy files with sshi scp <name> SRC DST (use : prefix for remote paths).

Installation

From Source

git clone https://github.com/jacobsun000/sshi.git
cd sshi
uv build
uv pip install dist/*.whl

From PyPI (once published)

uv pip install sshi

This installs the sshi CLI into your environment.

Usage

Add a server

sshi add proj1-prod --host 12.34.56.78 --user ubuntu --key ~/.ssh/proj1-prod.pem --tags prod aws

SSH into server

sshi proj1-prod

Run remote command

sshi proj1-prod -- uptime

List all servers

sshi ls

Copy files

# local -> remote
sshi scp proj1-prod ./local.txt :/tmp/remote.txt

# remote -> local
sshi scp proj1-prod :/var/log/syslog ./syslog

Connectivity test

sshi test proj1-prod

Edit inventory manually

sshi edit

This opens the JSON file (by default: ~/.config/sshi/instances.json) in your $EDITOR.

Configuration File

Instances are stored in:

~/.config/sshi/instances.json

Example:

{
  "instances": {
    "proj1-prod": {
      "host": "12.34.56.78",
      "user": "ubuntu",
      "port": 22,
      "key": "~/.ssh/proj1-prod.pem",
      "jump": "ubuntu@bastion.example.com",
      "tags": ["prod", "aws"]
    }
  }
}

Development

Clone and install locally in editable mode:

git clone https://github.com/jacobsun000/sshi.git
cd sshi
uv pip install -e .

Run directly:

uv run sshi ls

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sshi-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sshi-0.1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file sshi-0.1.1.tar.gz.

File metadata

  • Download URL: sshi-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for sshi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fdcc418965ddb08ad6825c065666d9214dbe388ebfb97eef81243f14031eb07f
MD5 c567e57a5756dda744c29ad20d332064
BLAKE2b-256 f5a6380c405733ee1207042285018292f3fc50325a6f3be68f7194165b82b3ca

See more details on using hashes here.

File details

Details for the file sshi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sshi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for sshi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18c6b94a7906a698cbb09a033e9b755ee6f4a0c9ec61d712e1d78c5b500cac6b
MD5 87abb6f794c13701c3a445ea71fe4d69
BLAKE2b-256 8fa39167a05889751b7e3c5868c5bee74578af9ddede707262c967c086ad20bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page