ssh

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 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)

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) error

type SSH

type SSH struct {
	WrapLocalSSH bool
	// 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
}

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