Skip to main content

A lightweight SSH remote host management tool for managing and connecting to remote hosts.

Project description

Remote Hosts

PyPI Version Python Versions SSH Protocol Remote Management License Stars Lightweight
A lightweight and efficient SSH remote host management tool that makes your remote connections simpler and more convenient
English | ไธญๆ–‡

๐Ÿ“ฆ Installation

Install from PyPI (recommended)

pip install remote-hosts

Install from source

# Clone the repository
git clone https://github.com/hollson/remote-hosts.git
cd remote-hosts

# Build and install
pip install build
python -m build
pip install --force-reinstall dist/remote_hosts-*.whl

Installation verification

remote-hosts -v
pip show remote-hosts

Uninstall

pip uninstall remote-hosts -y
rm $HOME/.remote_hosts.json

๐ŸŽฏ Usage Examples

  • Display help information
$ remote-hosts -h
==============================================
        SSH Remote Host Management Tool        
==============================================

usage: remote-hosts [-h] [-v] [-e [editor]]

options:
  -l, --list      View host list
  -e [editor]     Edit configuration file
  -m, --manual    View operation guide
  -v, --version   Display version information
  -h, --help      Display help information
  • Login to remote host
$ remote-hosts
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    ID    โ”‚     Host      โ”‚   User   โ”‚      OS       โ”‚   Arch   โ”‚  Region   โ”‚   Mark    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚1         โ”‚example.com    โ”‚root      โ”‚ubuntu22.04    โ”‚x86_64    โ”‚New York   โ”‚example    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚2         โ”‚192.168.1.1    โ”‚root      โ”‚       -       โ”‚    -     โ”‚     -     โ”‚example    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Please enter host ID (q to exit): 1
Connecting to root@example.com:22...
  • Edit configuration file
$ remote-hosts -e
Please select text editor:
  1. default    System default text editor
  2. vi         Vi editor
  3. vim        Vim editor
  4. nano       Nano editor
  5. code       Visual Studio Code
Please enter option number: 

โš™๏ธ Configuration Example

The configuration file is located at ~/.remote_hosts.json in JSON format. A sample configuration file will be automatically created when running for the first time.

[
	{
		"id": 1,
		"host": "example.com",
		"port": 22,
		"user": "root",
		"key": "~/.ssh/id_rsa",
		"os": "ubuntu22.04",
		"arch": "x86_64",
		"region": "Beijing",
		"mark": "example"
	},
	{
		"id": 2,
		"host": "192.168.1.1",
		"user": "root",
		"mark": "example"
	}
]

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details

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

remote_hosts-0.1.3.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

remote_hosts-0.1.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file remote_hosts-0.1.3.tar.gz.

File metadata

  • Download URL: remote_hosts-0.1.3.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for remote_hosts-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e8f44a92baf4624f83a675d7b014ba39547ddfba4b8c69bfe2794254772dd594
MD5 d7d9130e3b5f79e343089c9d0c30d043
BLAKE2b-256 ec14df3b63dde076d05d9846818efd6f10bbe27eb20146f949ade5b7d61f5485

See more details on using hashes here.

File details

Details for the file remote_hosts-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: remote_hosts-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for remote_hosts-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 498c914e9caafbd954d5e5023163ec4f39ad3aa2307e368f8700da1422a6f232
MD5 3185c892dbef2ee9972d140da2759b30
BLAKE2b-256 9c6f2d4cc9893c5b7ecd9e2f838c191c0817f51b70467919b53428bbf5997cce

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