Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskPassword ¶
AskPassword asks password using the terminal
Types ¶
type Host ¶
type Host interface { GetID() string // Returns the network, "tcp" GetNetwork() string // Returns name:port GetHostAndPort() string // Returns ssh login username GetUserName() string // Return auth methods for the hots GetAuth() ([]ssh.AuthMethod, error) // Reach host via another one Via() Host }
Host interface used by the ssh dialer.
type RawPrivateKey ¶
type RawPrivateKey struct { sync.RWMutex Name string File string PEMData []byte Passphrase string // contains filtered or unexported fields }
RawPrivateKey contains the data for a private key. It can be from a file, or direct from the data
func (*RawPrivateKey) GetPrivateKey ¶
func (x *RawPrivateKey) GetPrivateKey() (interface{}, error)
GetPrivateKey reads the key from a file, asks passphrase if necessary, and returns a private key. Once the private key is retrieved, the same instance is returned, so keep references to this instance, don't copy
Click to show internal directories.
Click to hide internal directories.