A tool used to operate multiple servers and operate synchronously,
using simple oss -l host_list
export PATH=${PATH}:/path/to/oss
cd /path/to/oss
touch config.sh
cat "user=zhangsan" >> config.sh
cat "port=1046" >> config.sh
cat "key=~/.ssh/id_rsa" >> config.sh
touch host_list
echo "10.165.124.1" >> host_list
echo "10.165.124.2" >> host_list
oss -l host_list
- syntax
oss [-u user] [-p port] [-i identify_key] [-l ip_list_file] [ip1 ip2 ... ipn]
- example
oss test12 test13
oss 10.165.124.18 10.165.124.34
oss -u zhangsan -p 1000 10.165.124.18 10.165.124.34
oss -l ip_list_file
If you want set default value for username
/port
/etc,
jus add a config file named config.sh
and add following config:
username=zhangsan2
port=2222
key=~/.ssh/id_rsa
Oss will load it from the file.