https://github.com/unitech/multissh
SSH into multiple machine to execute a command in parallel, with a convenient terminal UX
https://github.com/unitech/multissh
Last synced: 10 months ago
JSON representation
SSH into multiple machine to execute a command in parallel, with a convenient terminal UX
- Host: GitHub
- URL: https://github.com/unitech/multissh
- Owner: Unitech
- Created: 2016-05-12T22:56:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-19T13:45:24.000Z (about 9 years ago)
- Last Synced: 2025-02-28T01:17:59.973Z (11 months ago)
- Language: JavaScript
- Homepage: https://gridcontrol.tech/
- Size: 670 KB
- Stars: 51
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MultiSSH
Multi screen termcaps UI to execute a command into a list of servers.
This module will ssh into each host passed in arguments and execute the command.

**NB: Make sure you have your SSH pub key into each host via `$ ssh-copy-id user@ip`**
```javascript
var multissh = require('multissh');
// Execute command `ls -al` in each host
multissh.start({
cmd : 'ls -al',
title : 'Doing a file listing',
server_list : [{
ip : ip,
user : user,
key : 'rsa_pub.key', // Optional key
local: true // Exec command via exec instead of ssh
},{
ip : ip,
user : user
}],
}, function(cb) {
// Optionnal callback
});
```
# Misc commands
IP : `hostname -I | cut -d " " -f1`
Remove interactive checks: "grep "case \$-" .bashrc && sed -i '5,9d' .bashrc"