Giter VIP home page Giter VIP logo

phmgr's Introduction

phmgr

A simple host manager co-worked with native known_hosts file

Usage

Just type pssh in your console, and you can see a menu listing that auto-generated from your ~/.ssh/known_hosts

$ pssh

You can quickly select what you want to do after the prompt:

Please input your selection:

by four menas:

  1. quick connect to item 2 in the menu using ssh

     Please input your selection: 2
    
  2. or using ping, mosh, scp by prepend command to the selection:

     Please input your selection: p 2
     Please input your selection: ping 2
     Please input your selection: m 2
     Please input your selection: mosh 2
     Please input your selection: scp 2
    
  3. for scp command, use the following syntax to doing scp copy:

    from local to remote: * Use scp, please provide target >> local/path/file :remote/path/file

    from remote to local: * Use scp, please provide target >> :remote/file local/path/file

    prepend -r before the path if you want to recursively copy a directory

  4. use q, quit, or exit to exit the menu.

Optional Config

If you have a bunch of hosts that make the menu hard to search, you can use ~/.ssh/pssh_config to classify hosts into different group.

The syntax of pssh_config is YAML

Use qq, .., or ../ to go back from sub-menu to main menu

  • class: The class name displaying in pssh menu
  • host: be used to do equal match with host/ip
  • regexp: Perl regexp format to do pattern match with host/ip

Example config:

classes:
  - class: School
    host:
      - 10.113.23.1
      - 10.113.23.2
    regexp:
      - .*.cs.nctu.edu.tw

  - class: *.linpc.org
    regexp:
      - .*.linpc.org

  - class: My Develop Env
    host:
      - dev1.example.com
      - dev2.example.com

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.