🚀🚀A high-performance and high-concurrency ssh tool written in Go. It is 10 times faster than Ansible. If you need much more performance and better ease of use, you will love it.
Add dangerous commands detection feature for subcommand command
and script
:
Add global flag: -B, --run.command-blacklist
for specifying dangerous commands.
Default dangerous commands: ["rm", "reboot", "halt", "shutdown", "init", "mkfs", "mkfs.*", "umount", "dd"]
Add flag -n, --no-safe-check
for subcommands command
and script
to disable dangerous commands detection.
Add option run.command-blacklist
to config file for subcommand config
.
gossh fetch
flags have been changed:
Before: -t, --tmp-dir string
directory of target hosts for storing temporary zip file (default "$HOME")
After: -T, --tmp-dir string
directory for storing temporary zip file on target hosts, only useful if the -z flag is used (default "$HOME")
Add short flag -t
for --timeout.command
:
Before: --timeout.command int
After: -t, --timeout.command int
Optimize help usage information for subcommands.
Optimize output messages and enrich debug log information.
Add flag -z, --zip
for subcommand push
:
-z, --zip enable zip files ('unzip' must be installed on target hosts)
Improve the files transfer efficiency of the subcommand push
.
The subcommand push
no longer uses zip compression by default. If you want to continue using zip compression, you can add the -z
flag to the command line.
Optimize help usage information. Add neccessary positional arguments to Usage info for subcommands: command
, script
, push
, fetch
, vault encrypt
, vault decrypt
, vault encrypt-file
, vault decrypt-file
, vault view
.
E.G.
$ gossh command -h
Output:
Before:
Execute commands on target hosts.
Usage:
gossh command [flags]
...
Now:
Execute commands on target hosts.
Usage:
gossh command [HOST...] [flags]
...
Flag -i,--auth.identity-files
changed to -I,--auth.identity-files
,
and flag -H,--hosts.inventory
changed to -i,--hosts.inventory
.
Optimize subcommand config
.
Update configuration demo file configs/gossh.yaml
.
Optimize examples of subcommands.
Change default tmp dir for subcommand fetch
.
Default value of flag -t, --tmp-dir
changed from /tmp
to $HOME
.
Optimize the priority of the ssh authentication methods.
Old: password > pubkey > ssh-agent
,
New: ssh-agent > pubkey > password
.
For details at (#31).
Optimize description of flag --timeout.command
.
Fix a bug about ssh authentication. The bug description:
When attempting ssh-agent fails, pubkey authentication is skipped and password authentication is used directly.
Fix a bug about ssh-agent authentication method about proxy server.
Flag -L, --hosts.list
changed to -l, --hosts.list
.
Flag -l, --run.lang
changed to -L, --host.lang
.
Optimize help description of flag -V, --auth.vault-pass-file
.
Support group hosts, group vars and group combination in inventory file.
Example inventory file:
# This is a hosts inventory file for gossh
# no group hosts
alias_name_node1 host=node1.sre.im
node100.sre.im
# hosts group
[webserver]
alias_name_node2 host=192.168.33.12 port=8022 user=vagrant password=123456 keys=~/.ssh/id_dsa,~/.ssh/id_rsa passphrase=xxx
node[06-07].sre.im port=9022 user=lisi password=654321
node08.sre.im
# host vars for group webserver
[webserver:vars]
port=8033
user=wangwu
[dbserver]
192.168.1.10
[dbserver:vars]
user=vagrant2
password=abcdefg
# hosts group project1 has hosts that defined in group dbserver and group webserver
[project1:children]
dbserver
webserver
For details at (#29).
-H, --hosts.file
changed to -H, --hosts.inventory
.Allow adding variables to inventory(host file), available variables:
host
port
user
password
keys
passphrase
Example host file:
alias_name_node1 host=node1.sre.im
alias_name_node2 host=192.168.33.12 port=8022 user=vagrant password=123456 keys=~/.ssh/id_dsa,~/.ssh/id_rsa passphrase=xxx
node3.sre.im user=zhangsan password=GOSSH-AES256:9cfe499133b69a6c7fc62b5b6ba72d3d8dfb4d0e7987170a40c5d50bb5d71e19
node[06-10].sre.im port=9022 user=lisi password=654321
192.168.1.[1-3]
...
For details at (#27).