ssh

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultUsername = "zeta"

Variables

View Source
var DefaultUserSettings = &config.UserSettings{
	IgnoreErrors:         false,
	IgnoreMatchDirective: true,
	SystemConfigFinder:   config.SystemConfigFinder,
	UserConfigFinder:     config.UserConfigFinder,
}
View Source
var (
	W = tr.W
)

Functions

func NewKnownHostsCallback added in v0.17.0

func NewKnownHostsCallback(files ...string) (ssh.HostKeyCallback, error)

NewKnownHostsCallback returns ssh.HostKeyCallback based on a file based on a known_hosts file. http://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT

If list of files is empty, then it will be read from the SSH_KNOWN_HOSTS environment variable, example:

/home/foo/custom_known_hosts_file:/etc/custom_known/hosts_file

If SSH_KNOWN_HOSTS is not set the following file locations will be used:

~/.ssh/known_hosts
/etc/ssh/ssh_known_hosts

func NewTransport

func NewTransport(ctx context.Context, endpoint *transport.Endpoint, operation transport.Operation, verbose bool) (transport.Transport, error)

Types

type Command

type Command struct {
	*ssh.Session
	io.Reader

	DbgPrint func(format string, args ...any)
	// contains filtered or unexported fields
}

func (*Command) Close

func (c *Command) Close() error

func (*Command) LastError

func (c *Command) LastError() error

func (*Command) Setenv

func (c *Command) Setenv(name string, value string) error

func (*Command) Start

func (c *Command) Start(cmd string) error

func (*Command) Wait

func (c *Command) Wait() error

Directories

Path Synopsis
Package ssh_config provides tools for manipulating SSH config files.
Package ssh_config provides tools for manipulating SSH config files.

Jump to

Keyboard shortcuts

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