使用csshX同步管理多个SSH会话

前言

终端登陆管理方案很是成熟除了耳熟能详的跨平台付费方案SeureCRT,Windows有Xshell,macOS有iTerm2,不过在macOS下想用到相似SecureCRT和Xshell同样的Send to all功能可能就没有这么方便了,而csshX正好能够知足批量管理操做的需求css

使用csshX同步管理多个SSH会话

更新历史

2018年11月26日 - 初稿node

阅读原文 - https://wsgzao.github.io/post...git

扩展阅读github

csshx - https://github.com/brockgr/csshxshell


csshx简介

As csshX is a command line tool, no special installation is needed. It may
be copied into a directory in your path, (e.g. /usr/local/bin) for your
convenience.ruby

The software has been tested on Mac OS X 10.5, 10.6 and 10.7 with the default
Perl installation - no additional Perl modules are required.bash

DOCUMENTATION:服务器

The documentation for csshX is self contained. Please run:app

csshX --man

使用brew安装csshx

Name: csshx
Use: Cluster ssh tool for Terminal.app
URL: https://github.com/brockgr/csshxssh

# 安装homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
# 安装csshx
brew install csshx

csshx使用

当咱们管理数十台或更多 Linux 服务器的时候,每每须要在每台服务器上执行一样的命令,好比咱们想一次查看 10 台服务器(node)上系统负载状况,或者想知道哪台服务器有剩余内存能够分给新客户,又或者想执行 df 命令看看哪一个服务器上还有多的硬盘空间等等,除了能够用脚本或工具统一收集这些信息外,咱们还能够考虑使用一些同步管理多个 SSH 会话的小工具来帮助管理多台服务器,节省时间提升管理效率。在 Linux 上能够用 pdsh、ClusterSSH 和 mussh;在 Mac 上能够用 csshX.

# 使用 csshX 很简单,若是要同时 ssh 到 4 个服务器能够直接传递IP
csshX 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.4

# 也能够把这些要 ssh 管理的 IP 写到一个文件里,而后加载这个文件
vi hosts
192.168.0.1
192.168.0.2
192.168.0.3
192.168.0.4

csshX --hosts hosts

其余问题

csshx is not working in New Mac OS Release MacOS Mojave

https://github.com/brockgr/cs...

brew install parera10/csshx/csshx
相关文章
相关标签/搜索