gopssh

command module
v0.0.0-...-2f55f5f Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: MIT Imports: 7 Imported by: 0

README

gopssh

Utility for execute command at remote servers by ssh

Usage

  1. Clone repo gopssh
git clone https://github.com/unixzen/gopssh.git
  1. Build binary
cd ./gopssh
go build gopssh.go
  1. Create config file - config.yaml

Example config file:

---

ssh_key_path: "/home/user/.ssh/id_rsa"
ssh_user: "root"
ssh_password: "testpassword"
ssh_port: "22"
method: "key"
command: "uptime"
passphrase: "testphrase"
hosts: 
  - host1
  - host2
  - host3
  1. Start gopssh
./gopssh

Example output:

user@localmachine:~/notes/repo/gopssh $ ./gopssh
host1
 14:10:38 up 13 days,  1:52,  1 user,  load average: 0.00, 0.00, 0.00

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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