Documentation ¶
Index ¶
- Constants
- func AddCommandlineArgs(flagset *pflag.FlagSet, opts *SSHOptions)
- func InteractiveHostKeyCallback(knownHostsFilePath string) (ssh.HostKeyCallback, error)
- func NewCommand(clientConfig clientcmd.ClientConfig) *cobra.Command
- func PrepareCommand(cmd *cobra.Command, clientConfig clientcmd.ClientConfig, opts *SSHOptions, ...) (kind, namespace, name string, err error)
- func RunLocalClient(kind, namespace, name string, options *SSHOptions, clientArgs []string) error
- type NativeSSHConnection
- type SSH
- type SSHOptions
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 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
Click to show internal directories.
Click to hide internal directories.