批量SSH操做工具---OmniTTY(安裝)

機器多了,須要同時在多臺機器上執行命令,幾個簡單的命令寫腳本不划算,SecureCRT同時可打開Tabs數量有限制,找出OmniTTY,以前是由於OmniTTY在終端裏顯示很差,壓箱底去了,如今得翻出來了……shell

安裝

安裝rote

# pwdubuntu

/tmp/rote-0.2.8vim

# ./configuressh

# makees5

# make install.net

......開發

mkdir -p /usr/local/include/roteget

rm -f /usr/local/include/rote/*.hit

cp rote.h /usr/local/include/roteio

mkdir -p /usr/local/lib

cp librote.so.0.2.8 /usr/local/lib

cd /usr/local/lib && ln -sf librote.so.0.2.8 librote.so

cd /usr/local/lib && ln -sf librote.so.0.2.8 librote.so.0

chmod 755 rote-config

mkdir -p /usr/local/bin

cp -p rote-config /usr/local/bin

-----------------------------------------------------------

ROTE - Our Own Terminal Emulation Library v0.2.8

Include files installed at: /usr/local/include

Library files installed at: /usr/local/lib

rote-config executable : /usr/local/bin/rote-config

To find out what compiler arguments you should use to

compile programs that use rote, use the rote-config

program (make sure /usr/local/bin is in your path).

-----------------------------------------------------------

......

:若是報錯」Need ncurses to compile librote「,須要安裝ncurses開發包,

CentOS

# yum install ncurses-devel

ubuntu

$ apt-get install libncurses5-dev

 

將rote的so文件加入系統查找路徑裏(否則omnitty運行時會提示找不到so)

# whereis librote.so.0

librote.so: /usr/local/lib/librote.so.0 /usr/local/lib/librote.so

# vim /etc/ld.so.conf.d/omnitty-x86_64.conf

添加以下內容:

/usr/local/lib

# ldconfig

安裝OmniTTY

# pwd

/tmp/omnitty-0.3.0

# ./configure

# make

# make install

......

mkdir -p /usr/local/bin

cp omnitty /usr/local/bin

mkdir -p /usr/local/man/man1

cp omnitty.1 /usr/local/man/man1

......

使用

# omnitty

菜單

底欄

image_thumb6

「F1」菜單欄

image_thumb9

」幫助說明「信息(簡單的E文)

image_thumb14

添加主機/主機列表

單個主機

F5--->」Add:172.18.8.7「

image_thumb15

主機列表

F5--->」Add:@主機列表文件路徑「

image_thumb17

:文件路徑不要太長,太長也輸不進去。:-(

image

注:ssh退出的機器想再次登錄,進不去:-( 從新加。

image

SecureCRT、putty、Xshell不一樣終端打開OmniTTY,顯示上各有不一樣,示例裏的截圖是在shellinabox裏進行的(顯示相對正常)

默認運行omnitty,機器列表項顯示不全,參考man omnitty,添加參數」-W」設置顯示長度,我是用的alias omnitty=’omnitty –W 15’

相關文章
相關標籤/搜索