sshrun

package
v0.0.0-...-9c72d28 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0, Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(client scp.Client)

func Connect

func Connect(sshInfo SSHInfo) (scp.Client, error)

func ConnectKeyPath

func ConnectKeyPath(sshKeyPathInfo SSHKeyPathInfo) (scp.Client, error)

func Copy

func Copy(client scp.Client, sourcePath string, remotePath string) error

func RunCommand

func RunCommand(client scp.Client, cmd string) (string, error)

func SSHCopy

func SSHCopy(sshInfo SSHInfo, sourcePath string, remotePath string) error

func SSHCopyByKeyPath

func SSHCopyByKeyPath(sshInfo SSHKeyPathInfo, sourcePath string, remotePath string) error

func SSHRun

func SSHRun(sshInfo SSHInfo, cmd string) (string, error)

=============== for One Call Service

func SSHRunByKeyPath

func SSHRunByKeyPath(sshInfo SSHKeyPathInfo, cmd string) (string, error)

Types

type SSHInfo

type SSHInfo struct {
	UserName   string // ex) "root"
	PrivateKey []byte // ex)   []byte(`-----BEGIN RSA PRIVATE KEY-----
	//              MIIEoQIBAAKCAQEArVNOLwMIp5VmZ4VPZotcoCHdEzimKalAsz+ccLfvAA1Y2ELH
	//              ...`)
	ServerPort string // ex) "node12:22"
}

====================================================================

type SSHKeyPathInfo

type SSHKeyPathInfo struct {
	UserName   string // ex) "root"
	KeyPath    string // ex) "/root/.ssh/id_rsa // You should use the full path.
	ServerPort string // ex) "node12:22"
}

====================================================================

Directories

Path Synopsis
Proof of Concepts for the Cloud-Barista Multi-Cloud Project.
Proof of Concepts for the Cloud-Barista Multi-Cloud Project.

Jump to

Keyboard shortcuts

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