ssh

package
v0.0.0-...-6478544 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: This is to quickly work around a customer problem. We should
	// implement a connection pool instead.
	SshTimeoutSeconds    = 600
	SshTimeout           = time.Duration(SshTimeoutSeconds) * time.Second
	GetKubeconfigCommand = "cat /etc/kubernetes/admin.conf"
)

Variables

This section is empty.

Functions

func GetBasicSession

func GetBasicSession(s *sshProviderClient) (*ssh.Session, *ssh.Client, error)

func NewSSHProviderClient

func NewSSHProviderClient(privateKey string, passPhrase string, machineSSHConfig v1alpha1.SSHConfig) *sshProviderClient

func PublicKeyFile

func PublicKeyFile(privateKey string, passPhrase string) (ssh.AuthMethod, error)

func SSHAgent

func SSHAgent() ssh.AuthMethod

this should allow local use of clusterctl to access remote cluster as long as your socket has the private key added to the agent.

Types

type SSHProviderClientInterface

type SSHProviderClientInterface interface {
	ProcessCMD(cmd string) error
	ProcessCMDWithOutput(cmd string) ([]byte, error)
	WritePublicKeys(machineSSHConfig v1alpha1.SSHConfig) error
	DeletePublicKeys(machineSSHConfig v1alpha1.SSHConfig) error
	GetKubeConfig() (string, error)
	GetKubeConfigBytes() ([]byte, error)
}

Directories

Path Synopsis
actuators
controllers

Jump to

Keyboard shortcuts

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