Giter Club home page Giter Club logo

mcx's Introduction

Mcx

A tmux-based SSH/Telnet Client for Managing Many-hosts


Get Started

Prerequisites

tmux

Since Mcx is tmux-based, you must use your system's package manager to install the tmux first. For example, you can use

apt-get install tmux

in Ubuntu, or

brew install tmux

in Mac OS X.

Python modules:

The modules pexpect, toml and pypinyin should be installed first via:

pip install pexpect pypinyin toml

Ftp client

An application that can handle the "ftp://" urls should be installed. If you do not use ftp, this can be ignored.

Basic Installation

Clone this repository

git clone https://github.com/Tefx/Mcx.git

Configuration

  1. Copy the sample configurations to /etc/mcx or ~/.mcx:

    cp -r Mcx/conn_sample ~/.mcx
  2. Change the ftp url handler by setting the value offtp_tool in $CONF_PATH/config.json.

  • You can easily set it to xdg-open for Linux or open for Mac OS X.
  • You can alternatively set it to filezilla or any other specific app, as long as it can handle the url ftp://user:password@ip.
  1. Put you host configurations inside $CONF_PATH/hosts folder.
  • Have a Look at the sample host configurations. It should be self-explanatory.
  • conn_type should be either ssh or telnet.
  • auth_type should be either password or key. If the value is password, the variable password must be set. If the value is key, an optional variable passphrase might be needed at the same time.
  • The sub-folders and any number of configuration files are acceptable. The hosts folder will be scanned recursively for all hosts.

Usages

Launch

cd Mcx;tmux -f tmux.source

Keymap

Keybinding Description
Prefix S search hosts by name.
Prefix F open ftp application and connect to the current host.
Prefix V open a vertically splited pane and connect to the same host.
Prefix v open a horizontally splited pane and connect to the same host.
Prefix C view all connected hosts. I call this listing pane as host-listing-pane.
d kill connections to the selected hosts. Works only in the hast-listing-pane.
  • Notes:
    • The Prefix should be Ctrl-B by default in tmux.
    • Using Prefix S to connect a host which is already have connections in other window is considered as connecting a new host. The different windows connected to the same host are shown as several hosts in the host-listing-pane and can be killed individually.
    • All other tmux-shortcuts should be usable as usual.
    • In searching, the patterns can be full Pinyin, Pinyin Initials, Pinyin first-letters or substrings. / is used for splitting different levels. For example, "北京/new/测试MySQL/Server1" can be matched by:
      • bj
      • bj/csh
      • bj/cs/1
      • new/Ser
      • ceshi/1
      • And many other patterns. Try out by yourselves.

mcx's People

Contributors

tefx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.