smart-server-selector

command module
v0.0.0-...-66bf4fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2019 License: MIT Imports: 3 Imported by: 0

README

smart-server-selector

smart-server-selector is an efficiency terminal tool for backend system development engineer, especially for someone who have bunch of servers to switch.

It was developed with golang, which means it's very clean, no dependency and cross-platform.

In terms of features, it support keyword search, which could help you find server by hostname, ip, description, etc quickly.

Hope it could save your time.

Demo

demo

Install

You can find the download links at this page.

smart-server-selector support these platforms (May not be updated timely):

Installation is very easy.

You can use wget or curl download it, example for linux-amd64:

wget https://github.com/sisyphsu/smart-server-selector/releases/download/{version}/smart-server-selector-linux-amd64
curl https://github.com/sisyphsu/smart-server-selector/releases/download/{version}/smart-server-selector-linux-amd64 > smart-server-selector-linux-amd64 
chmod +x smart-server-selector-linux-amd64
mv smart-server-selector-linux-amd64 ~/.local/bin/sss 

Above steps download the smart-server-selector into ~/.local/bin, and name it sss, which is more convenient for keyboard inputting.

You should add ~/.local/bin directory into your $PATH, or using other PATH directory, this isn't a prerequisite, but you better do it.

The whole process didn't need any additional permission like root.

Configuration

After started, smart-server-selector will load servers from ~/.servers, you can edit this file directly.

These two format configurations are valid:

# comments, empty line is ok.
test    10.10.10.1   description
test    10.10.10.1   22     username   description

Explain:

  • test: environment name, like test/pre/prod, no limit.
  • 10.10.10.1: host name, could ip or hostname.
  • 22: ssh port
  • username: ssh login name
  • description: any text

If your configuration is invalid, smart-server-selector will ignore it and print notice info.

Advice

If your server's ssh port or ssh username don't match the default value, then you should config it in global ssh config(~/.ssh/config), for example:

Host *
        Port 9876
        User other-name
        TCPKeepAlive yes
        ServerAliveInterval 60
        StrictHostKeyChecking no

This way could keep the server-list clean, and no need to config port or user for each server.

For more details, check this link.

Thanks

UI powered by tview and tcell.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL