Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadPrivateKey ¶
func ReadPrivateKey(pk string) (ssh.AuthMethod, error)
ReadPrivateKey returns an authentication method relying on private/public key pairs The argument is : - either a path to the private key file, - or the content or this private key file
Types ¶
type Client ¶
Client is interface allowing running command
type SSHAgent ¶
type SSHAgent struct {
Socket string
// contains filtered or unexported fields
}
SSHAgent is an SSH agent
func NewSSHAgent ¶
NewSSHAgent allows to return a new SSH Agent
func (*SSHAgent) AddKey ¶
AddKey allows to add a key into ssh-agent keys list
func (*SSHAgent) GetAuthMethod ¶
func (sa *SSHAgent) GetAuthMethod() ssh.AuthMethod
GetAuthMethod returns the auth method with all agent keys
func (*SSHAgent) RemoveAllKeys ¶
RemoveAllKeys allows to remove all keys into ssh-agent keys list
func (*SSHAgent) RemoveKey ¶
RemoveKey allows to remove a key into ssh-agent keys list
type SSHClient ¶
type SSHClient struct {
Config *ssh.ClientConfig
Host string
Port int
}
SSHClient is a client SSH
func (*SSHClient) CopyFile ¶
CopyFile allows to copy a reader over SSH with defined remote path and specific permissions
func (*SSHClient) GetSessionWrapper ¶
func (client *SSHClient) GetSessionWrapper() (*SSHSessionWrapper, error)
GetSessionWrapper allows to return a session wrapper in order to handle stdout/stderr for running long synchronous commands
Source Files
¶
- session_pool.go
- sshutil.go