Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenerateSSHKey ¶
Generate SSH keypair based on path of the private key The public key would be generated to the same path with ".pub" added
func NewNativeConfig ¶ added in v0.3.0
func NewNativeConfig(user string, auth *Auth) (ssh.ClientConfig, error)
func SetDefaultClient ¶ added in v0.3.0
func SetDefaultClient(clientType SSHClientType)
func WaitForTCP ¶
Types ¶
type ExternalClient ¶ added in v0.3.0
func NewExternalClient ¶ added in v0.3.0
func NewExternalClient(sshBinaryPath, user, host string, port int, auth *Auth) (ExternalClient, error)
func (ExternalClient) Output ¶ added in v0.3.0
func (client ExternalClient) Output(command string) (string, error)
func (ExternalClient) Shell ¶ added in v0.3.0
func (client ExternalClient) Shell() error
type KeyPair ¶ added in v0.3.0
func NewKeyPair ¶ added in v0.3.0
Generate a new SSH keypair This will return a private & public key encoded as DER.
func (*KeyPair) Fingerprint ¶ added in v0.3.0
Calculate the fingerprint of the public key
type NativeClient ¶ added in v0.3.0
type NativeClient struct { Config ssh.ClientConfig Hostname string Port int }
func (NativeClient) Output ¶ added in v0.3.0
func (client NativeClient) Output(command string) (string, error)
func (NativeClient) OutputWithPty ¶ added in v0.3.0
func (client NativeClient) OutputWithPty(command string) (string, error)
func (NativeClient) Shell ¶ added in v0.3.0
func (client NativeClient) Shell() error
type SSHClientType ¶ added in v0.3.0
type SSHClientType string
const ( External SSHClientType = "external" Native SSHClientType = "native" )
Click to show internal directories.
Click to hide internal directories.