Fssh-Flash speed Batch remote command execution tool source code released, fssh-Flash speed
Fssh, short for flash ssh, is designed to run commands remotely in batches through ssh flash speed. You only need to deploy this script on the master machine without installing a proxy on the controlled machine, the execution time of the tested 120 machines is within 3 seconds.
Source Code address: https://github.com/LaiJingli/fssh
Usage:
Master execution
0. Install sshpass (omitted)
1. wget https://raw.githubusercontent.com/LaiJingli/fssh/master/fssh.sh
2. chmod + x fssh. sh
3. Modify the IP address and command in the script
4../fssh. sh
Features:
1. The master and the control end use ssh to encrypt and communicate with each other without any configuration;
2. The command format is exactly the same as that of directly entering and writing shell scripts in bash;
3. Transparent support for all special characters such as commands, variables, single quotes, and double quotation marks, which are not different from local execution;
4. Support for sudo privilege escalation and password-free access. You only need to add the corresponding permissions of common accounts to sudoers. This is a great boon for many production environment administrators, sudo can also be automated;
5. the remote host's execution result is formatted and output. The execution result can be viewed at a glance and saved to log for audit convenience;
6. Automatic statistics on the number of tasks executed, including the total number of tasks, number of completed tasks, and number of completed and successful tasks;
7. The execution speed is Flash speed.
8. The remote account can be used for ssh trust authentication or the default password authentication, which is transparent to users;
Execution efficiency:
The execution time of 120 remote hosts is within 10 seconds. After the flash ssh optimization option is enabled, the execution time is shortened to 3 seconds.
Effect: