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, ...) (namespace, name string, err error)
- func RunLocalClient(cmd *cobra.Command, namespace, name string, options *SSHOptions, ...) error
- type NativeSSHConnection
- type SSH
- type SSHOptions
Constants ¶
View Source
const ( KnownHostsFileName = "d8virtualization_known_hosts" IdentityFilePathFlag, _ = "identity-file", "i" )
Variables ¶
This section is empty.
Functions ¶
func AddCommandlineArgs ¶
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 ¶
func PrepareCommand(cmd *cobra.Command, clientConfig clientcmd.ClientConfig, opts *SSHOptions, args []string) (namespace, name string, err error)
func RunLocalClient ¶
Types ¶
type NativeSSHConnection ¶
type NativeSSHConnection struct { ClientConfig clientcmd.ClientConfig Options SSHOptions }
func (*NativeSSHConnection) PrepareSSHClient ¶
func (o *NativeSSHConnection) PrepareSSHClient(namespace, name string) (*ssh.Client, error)
func (*NativeSSHConnection) StartSession ¶
func (o *NativeSSHConnection) StartSession(client *ssh.Client, command string) error
type SSHOptions ¶
type SSHOptions struct { SSHPort int SSHUsername string IdentityFilePath string IdentityFilePathProvided bool KnownHostsFilePath string KnownHostsFilePathDefault string AdditionalSSHLocalOptions []string WrapLocalSSH bool LocalClientName string }
func DefaultSSHOptions ¶
func DefaultSSHOptions() SSHOptions
Click to show internal directories.
Click to hide internal directories.