ssh

package
v0.0.0-...-85d5e77 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options func(*SSHManager)

func WithKeyName

func WithKeyName(name string) Options

func WithPath

func WithPath(path string) Options

func WithPort

func WithPort(port int) Options

type SSHManager

type SSHManager struct {
	// contains filtered or unexported fields
}

func New

func New(host string, ops ...Options) *SSHManager

New creates a new instance of SSHManager with optional configurations.

func (*SSHManager) AddSSHConfig

func (cfg *SSHManager) AddSSHConfig() error

AddSSHConfig generates and appends or updates the SSH config.

func (*SSHManager) GenerateSSHKeyPair

func (cfg *SSHManager) GenerateSSHKeyPair() (privateKeyPath, publicKeyPath string, err error)

GenerateSSHKeyPair generates an SSH key pair (private and public).

Jump to

Keyboard shortcuts

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