module
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: May 22, 2016
License: MIT
Opens a new window with license information.
README
¶
#+STARTUP: showall
#+OPTIONS: toc:t
#+OPTIONS: num:t
#+OPTIONS: html-postamble:nil
#+LANGUAGE: zh-CN
#+OPTIONS: ^:{}
#+TITLE: Melanite
* 概述
利用SSH协议,远程执行命令的命令行工具。
远程服务器不用安装任何程序,只要开通SSH服务即可。
简单,轻量,配置灵活。
* Feature
** 远程执行命令
同时发送命令到多台机器执行,获取执行结果并显示。
支持并发在多台机器上执行命令。
** 主机分组
可以给主机分组,按照组名执行命令。
一个组可以包含一个或多个主机,一个主机也可以属于一个多个组。
** YAML 描述主机组和主机关系
配置密码和ssh-key的路径配置一个即可。
#+BEGIN_SRC yaml
NodeGroups:
- GroupName: group001
Nodes:
- Name: golang
Host: 192.168.1.1
Port: 22
User: user
Password: password
KeyPath:
- Name: python
Host: 192.168.1.2
Port: 22
User: root
Password: rootpass
KeyPath:
- GroupName: group002
Nodes:
- Name: elixir-lang
Host: 10.0.0.1
Port: 22
User: testuser
Password: testtest
KeyPath:
- Name: elm-lang
Host: elm-lang.cn
Port: 22
User: root
Password:
KeyPath: /home/user/.ssh/private-key
#+END_SRC
** 命令自动补全
ZSH 和 BASH 环境下启用自动补全方式是不一样的,启用方式如下:
1. ZSH 环境下
把下面的代码加入到 .zshrc
#+BEGIN_SRC sh
source /path/to/melanite/autocomplete/zsh_completion
#+END_SRC
2. BASH 环境下
把下面的代码加入到 .bashrc
#+BEGIN_SRC sh
source /path/to/melanite/autocomplete/bash_completion
#+END_SRC
补充:
1. 这2个 completion 脚本在 MacOSX 下已测试可以使用。
如果在 linux 下使用的话,请修改 bash_completion 中 */usr/local/etc/bash_completion* 的实际位置。
2. 使用前安装 bash-completion package,Mac 下安装方式如下:
#+BEGIN_SRC sh
brew install bash-completion
#+END_SRC
* License
MIT License 2016 (Iota Labs)
Directories
¶
src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.