GithubHelp home page GithubHelp logo

jiho-dev / smart-server-selector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sisyphsu/smart-server-selector

0.0 1.0 0.0 6.13 MB

An efficiency terminal tool, which support ssh server search & select.

License: MIT License

Go 99.43% Makefile 0.57%

smart-server-selector's Introduction

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 ~/.sssh/sss-host.cfg, you can edit this file directly.

These two format configurations are valid:

# full   : env host-type host-hame ip port user desc
# simple : env host-type host-hame ip desc

# comments, empty line is ok.
aws dev my-dev 10.10.10.1 22 ubuntu "ubuntu develop vm"
aws test my-test 10.10.10.2 22 test "ubuntu test vm"
aws test1 my-test1 10.10.11.2 - - "ubuntu test vm"
gcp simpe simpe-vm 10.10.10.3 "simple config server"

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.

smart-server-selector config from ~/.sssh/sss.yaml

---
host-file: "/home/user.name/.ssh/sss-host.cfg"

show-about: false
show-badge: true

ssh-port: 
  - "aws": "22"
  - "gcp": "222"

user-name: 
  - "aws": "centos"
  - "gcp": "centos-gcp"

ssh-key: 
  - "aws" : "/home/user.name/ssh-keys/sshkey-aws.priv"
  - "gcp" : "/home/user.name/ssh-keys/sshkey-gcp.priv"

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

smart-server-selector's People

Contributors

fdlsk2r avatar jiho-dev avatar sisyphsu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.