commando

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2019 License: BSD-3-Clause Imports: 15 Imported by: 0

README

commando

Run commands in bulk on remote machines.

Go Report Card Build Status GoDoc NetflixOSS Lifecycle GitHub

Project Overview

Module go.gophers.dev/cmds/commando provides a CLI utility for running commands in bulk on a set of machines. It allows for setting a password that will be used in prompts on the remote machine (e.g. using sudo).

Getting Started

The commando command can be installed by running

$ go get go.gophers.dev/cmds/commando
Example usage
No password required
$ commando --hosts gophers.dev --command "uname -a"
will execute command
uname -a
on hosts
[gophers.dev]
--- gophers.dev ---
executing command `uname -a`
Linux ubs1 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
With password required
# running sudo whoami will cause a password prompt, so we pass --pw to have
# commando prompt for a password to send and answer the prompt with

$ ./commando --hosts gophers.dev --command "sudo whoami" --pw
will execute command
sudo whoami
on hosts
[gophers.dev]
  password for 'hoenig' -->
--- gophers.dev ---
executing command `sudo whoami`
[sudo] password for hoenig:
root

Contributing

The go.gophers.dev/cmds/commando module is always improving with new features and error corrections. For contributing bug fixes and new features please file an issue.

License

The go.gophers.dev/cmds/commando module is open source under the BSD-3-Clause license.

Documentation

Overview

Command commando is a command line tool for executing expect scripts via ssh on remote servers. It is as terrible as it sounds.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL