ssh

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IdentityFilePathFlag, _ = "identity-file", "i"
)

Variables

This section is empty.

Functions

func AddCommandlineArgs added in v0.53.0

func AddCommandlineArgs(flagset *pflag.FlagSet, opts *SSHOptions)

func InteractiveHostKeyCallback

func InteractiveHostKeyCallback(knownHostsFilePath string) (ssh.HostKeyCallback, error)

InteractiveHostKeyCallback verifying the host key against known_hosts and adding the key if the user replies accordingly.

func NewCommand

func NewCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

func PrepareCommand added in v0.53.0

func PrepareCommand(cmd *cobra.Command, clientConfig clientcmd.ClientConfig, opts *SSHOptions, args []string) (kind, namespace, name string, err error)

func RunLocalClient added in v0.56.0

func RunLocalClient(kind, namespace, name string, options *SSHOptions, clientArgs []string) error

Types

type NativeSSHConnection added in v0.53.0

type NativeSSHConnection struct {
	ClientConfig clientcmd.ClientConfig
	Options      SSHOptions
}

func (*NativeSSHConnection) PrepareSSHClient added in v0.53.0

func (o *NativeSSHConnection) PrepareSSHClient(kind, namespace, name string) (*ssh.Client, error)

func (*NativeSSHConnection) StartSession added in v0.53.0

func (o *NativeSSHConnection) StartSession(client *ssh.Client, command string) error

type SSH

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

func (*SSH) Run

func (o *SSH) Run(cmd *cobra.Command, args []string) error

type SSHOptions added in v0.48.1

type SSHOptions struct {
	SSHPort                   int
	SSHUsername               string
	IdentityFilePath          string
	IdentityFilePathProvided  bool
	KnownHostsFilePath        string
	KnownHostsFilePathDefault string
	AdditionalSSHLocalOptions []string
	WrapLocalSSH              bool
	LocalClientName           string
}

func DefaultSSHOptions added in v0.53.0

func DefaultSSHOptions() SSHOptions

Jump to

Keyboard shortcuts

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