sshcmd

package
v0.0.0-...-7b12258 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Status = make(chan string, 10)

Functions

func NewOut

func NewOut(name, prgName, res string) global.Out

NewOut Create struscture with result shell command

func Run

func Run(ip string, list []string, conf Execer) ([]global.Out, []global.Out, error)

Run Runing gourutine with executing shell command check service Grouping result executing command

Types

type CmdExec

type CmdExec struct {
	Name    string
	PrgName string
	Chan    chan global.Out
	Cmd     string
}

type Comands

type Comands struct {
	Comm []CmdExec
}

type Execer

type Execer interface {
	Execute(string, CmdExec)
	GetSshPort() string
	Scp(ip, src, dest string) error
}

type SshConfig

type SshConfig struct {
	*ssh.ClientConfig
	// contains filtered or unexported fields
}

func (SshConfig) Execute

func (conf SshConfig) Execute(ip string, cmd CmdExec)

Execute Run shell command in ssh

func (SshConfig) GetSshPort

func (s SshConfig) GetSshPort() string

func (*SshConfig) InitSsh

func (s *SshConfig) InitSsh(username, port string)

Init_ssh Configure ssh connection to servers

func (SshConfig) Scp

func (conf SshConfig) Scp(ip, src, dest string) error

Jump to

Keyboard shortcuts

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