sshutil

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonOpts added in v0.7.2

func CommonOpts(useDotSSH bool) ([]string, error)

CommonOpts returns ssh option key-value pairs like {"IdentityFile=/path/to/id_foo"}. The result may contain different values with the same key.

The result always contains the IdentityFile option. The result never contains the Port option.

func ParseOpenSSHVersion added in v0.7.2

func ParseOpenSSHVersion(version []byte) *semver.Version

func SSHArgsFromOpts added in v0.7.2

func SSHArgsFromOpts(opts []string) []string

SSHArgsFromOpts returns ssh args from opts. The result always contains {"-F", "/dev/null} in additon to {"-o", "KEY=VALUE", ...}.

func SSHOpts added in v0.7.2

func SSHOpts(instDir string, useDotSSH, forwardAgent bool) ([]string, error)

SSHOpts adds the following options to CommonOptions: User, ControlMaster, ControlPath, ControlPersist

Types

type PubKey

type PubKey struct {
	Filename string
	Content  string
}

func DefaultPubKeys

func DefaultPubKeys(loadDotSSH bool) ([]PubKey, error)

DefaultPubKeys returns the public key from $LIMA_HOME/_config/user.pub. The key will be created if it does not yet exist.

When loadDotSSH is true, ~/.ssh/*.pub will be appended to make the VM accessible without specifying an identity explicitly.

Jump to

Keyboard shortcuts

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