https://github.com/grycap/shutils
https://github.com/grycap/shutils
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/grycap/shutils
- Owner: grycap
- License: mit
- Created: 2015-06-30T07:52:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-16T08:04:36.000Z (about 10 years ago)
- Last Synced: 2024-12-30T04:56:01.697Z (over 1 year ago)
- Language: Shell
- Size: 17.6 KB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
0. WHAT IS THIS?
This is a set of shell utils that solve common problems.
E.g.
- runall - runs a command in multiple hosts
- scpall - copies a file or a folder to multiple hosts
- cacheoutput - runs a command and stores its output as a cache (for a limited time) for future runs. It is designed for long-running commands that are ran frequently (e.g. a slow network connection) and may hang a server
- lockdir - is a folder based lock that is designed to prevent multiple concurrent runs as a semaphore. It can be configured to state how multiple runs are allowed
- sshblock - is a command to prevent ssh-probe attacks that blacklists those IP addresses that are trying multiple connections (tested in ubuntu-based systems)
1. INSTALL
Most utils are designed to be used as themselves. Only sshblock is designed to act as a resident application
1.1 sshblock
You should the next line to the file /etc/hosts.deny
ALL:/etc/sshblock/blacklist
You must add the next line to the file /etc/hosts.allow
sshd:ALL EXCEPT /etc/sshblock/blacklist:spawn ( /usr/local/bin/sshblock -w /etc/sshblock/whitelist -l /var/log/auth -m 5 & )
1.2 updateconfig
If you plan to install updateconfig to update config files, you need to install the cpyutils library. Please follow the instructions at https://github.com/grycap/cpyutils