ssh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Note: Remove when proposal https://go-review.googlesource.com/c/crypto/+/550096 is merged

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, network, addr string, config *ssh.ClientConfig) (*ssh.Client, error)

DialContext starts a client connection to the given SSH server. It is a convenience function that connects to the given network address, initiates the SSH handshake, and then sets up a Client.

The provided Context must be non-nil. If the context expires before the connection is complete, an error is returned. Once successfully connected, any expiration of the context will not affect the connection.

See [Dial] for additional information.

func SendKeepalive

func SendKeepalive(ctx context.Context, conn ssh.Conn)

SendKeepalive sends keepalive messages to the SSH server.

Types

type MacOSSession

type MacOSSession struct {
	*ssh.Session
	// contains filtered or unexported fields
}

func NewMacOSSession

func NewMacOSSession(session *ssh.Session, attach api.AttachIO, stdinPipe io.WriteCloser) *MacOSSession

func (*MacOSSession) ExecuteCommand

func (s *MacOSSession) ExecuteCommand(ctx context.Context, env []corev1.EnvVar, cmd []string) error

ExecuteCommand executes the provided command in the SSH session.

func (*MacOSSession) SetupSessionIO

func (s *MacOSSession) SetupSessionIO(ctx context.Context) error

SetupSessionIO sets up IO for the SSH session.

Jump to

Keyboard shortcuts

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