ssh

package
v0.7.3-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePrivateKey

func EncodePrivateKey(private *rsa.PrivateKey) []byte

func EncodePublicKey

func EncodePublicKey(public *rsa.PublicKey) ([]byte, error)

func EncodeSSHKey

func EncodeSSHKey(public *rsa.PublicKey) ([]byte, error)

func GenerateKey

func GenerateKey(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)

func MakeSSHKeyPair

func MakeSSHKeyPair() (prvKeyContent string, pubKeyContent string, err error)

Types

type Server

type Server struct {
	Host           string
	Port           string
	Username       string
	Password       string
	PrivateKeyPath string
}

func (Server) Exec

func (server Server) Exec(cmd string) error

Jump to

Keyboard shortcuts

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