Skip to main content

A server management tool which help you memorize ssh command

Project description

Installation:

$ pip install server-cli

Usage:

Type ‘sss’ to entry interaction interface.

Available subcommands:

  • ls [list all servers]

  • add [add a new server]

  • help

  • del <server id> [delete a server from database by id]

  • ssh <server id> [connect a server via ssh]

  • tag <tag name> [list all servers contained given tag name]

  • modify <server id> [modify attributes of specified server]

Example:

default

List all of services and wait for the specific server id:

$ sss
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+
| id |    name   |  user  |       host      | port |              tags              |    description    |
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+
| 1  | 亚马逊aws  | ubuntu |     0.0.0.0     |  22  | shadowsocks,telegramBot,MTpoto |   加利福尼亚机房   |
| 2  |   阿里云   |  root  |     0.0.0.0     |  22  |      Wechat,shadowsocks        |  阿里云 毕业就到期 |
| 3  | 腾讯云1号  | ubuntu |     0.0.0.0     |  22  |       Blog,huginn              |                   |
| 4  | 腾讯云3号  |  kwp   |     0.0.0.0     |  22  |         script                 |                   |
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+
id >
# and enter id you selected

list

List all of services:

$ sss ls
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+
| id |    name   |  user  |       host      | port |              tags              |    description    |
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+
| 1  | 亚马逊aws  | ubuntu |     0.0.0.0     |  22  | shadowsocks,telegramBot,MTpoto |   加利福尼亚机房   |
| 2  |   阿里云   |  root  |     0.0.0.0     |  22  |      Wechat,shadowsocks        |  阿里云 毕业就到期 |
| 3  | 腾讯云1号  | ubuntu |     0.0.0.0     |  22  |       Blog,huginn              |                   |
| 4  | 腾讯云3号  |  kwp   |     0.0.0.0     |  22  |         script                 |                   |
+----+-----------+--------+-----------------+------+--------------------------------+-------------------+

add

Add a new server:

$ sss add
name: Test
user: root
host: 0.0.0.0
port(default: 22):
key file path(None if use password): /path/to/your/key
tags (use ',' to split): test,local
description: this is a test

Successfully added!

delete

Delete a server with the specified <server id>:

$ sss del 6

Successfully deleted!

tag

Filter out servers that contain the given <tag name>:

$ sss tag shadowsocks
+----+-----------+--------+----------------+------+--------------------------------+-------------------+
| id |    name   |  user  |      host      | port |              tags              |    description    |
+----+-----------+--------+----------------+------+--------------------------------+-------------------+
| 1  | 亚马逊aws  | ubuntu |     0.0.0.0    |  22  | shadowsocks,telegramBot,MTpoto |   加利福尼亚机房    |
| 2  |   阿里云   |  root  |     0.0.0.0    |  22  |       Wechat,shadowsocks       | 阿里云 毕业就到期   |
+----+-----------+--------+----------------+------+--------------------------------+-------------------+

modify

Modify a server with the specified <server id>:

$ sss modify 1
name('亚马逊aws'):
user('ubuntu'):
host('0.0.0.0'):
port(22):
key file path('/path/to/your/key', enter '-' if use password):
tags([shadowsocks,telegramBot,MTpoto], use ',' to split):
description('加利福尼亚机房'):

Todo:

  • [ ] ping all servers

  • [ ] fill password automatically

  • [ ] supports Windows

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

server_cli-1.0.2-py2.py3-none-any.whl (5.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file server_cli-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: server_cli-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.8

File hashes

Hashes for server_cli-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 84740c0a20a8fee6c0135f9879b496336cb60654cbc6f78b314b86fb74b1488e
MD5 71190a3cf5402aa13fd9b40bc1a26e26
BLAKE2b-256 ce819456fe290037b952b913f4688aaed2e754d922b3ec7834367a6ec02355b3

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