ssh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyAlreadyExists = errors.New("SSH key already exists")

Functions

This section is empty.

Types

type Context

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

func NewContextForTests

func NewContextForTests(configDir, keygenExe string) Context

NewContextForTests creates a new `ssh.Context` with internal properties set to the specified values. It should only be used to inject test-specific setup.

func (*Context) GenerateSSHKey

func (c *Context) GenerateSSHKey(keyName string, passphrase string) (*KeyPair, error)

func (*Context) HasKeygen

func (c *Context) HasKeygen() bool

func (*Context) LocalPublicKeys

func (c *Context) LocalPublicKeys() ([]string, error)

func (*Context) SshDir

func (c *Context) SshDir() (string, error)

type KeyPair

type KeyPair struct {
	PublicKeyPath  string
	PrivateKeyPath string
}

Jump to

Keyboard shortcuts

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