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