https://github.com/txthinking/hancock
Manage multiple remote servers and execute commands remotely
https://github.com/txthinking/hancock
linux-management remote-command-execution remote-control ssh
Last synced: about 1 year ago
JSON representation
Manage multiple remote servers and execute commands remotely
- Host: GitHub
- URL: https://github.com/txthinking/hancock
- Owner: txthinking
- License: gpl-3.0
- Created: 2021-05-30T12:51:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T02:34:46.000Z (about 2 years ago)
- Last Synced: 2025-03-19T05:55:52.596Z (about 1 year ago)
- Topics: linux-management, remote-command-execution, remote-control, ssh
- Language: Go
- Homepage: https://www.txthinking.com
- Size: 133 KB
- Stars: 18
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# hancock
Manage multiple remote servers and execute commands remotely
❤️ A project by [txthinking.com](https://www.txthinking.com)
### Install via [nami](https://github.com/txthinking/nami)
```
nami install hancock
```
### Usage
```
Note:
When adding an instance, the user must be allowed to execute sudo without a password!!!
nami and joker are automatically installed when you run command for the first time on instance.
Add instance
$ hancock add --name mylinux --server 1.2.3.4:22 --user root --password mypassword
$ hancock add --name mylinux --server 1.2.3.4:22 --user root --key ./path/to/mykey.pem
$ hancock add -n mylinux -s 1.2.3.4:22 -u root -p mypassword
$ hancock add -n mylinux -s 1.2.3.4:22 -u root -k ./path/to/mykey.pem
List instances
$ hancock list
Remove instance
$ hancock mylinux remove
Run nami on an instance
$ hancock mylinux nami install brook
$ hancock mylinux nami list
Run joker on an instance
$ hancock mylinux joker brook server --listen :9999 --password hello
$ hancock mylinux joker last
$ hancock mylinux joker list
$ hancock mylinux joker stop 1234
$ hancock mylinux joker log 1234
Run command and wait output on an instance
$ hancock mylinux echo hello
$ hancock mylinux sleep 3 '&&' echo hello
Start command and do not wait output on an instance
$ hancock mylinux start echo hello
$ hancock mylinux start sleep 3 '&&' echo hello
Upload your own command
$ hancock mylinux upload ./path/to/command
```
## License
Licensed under The GPLv3 License