Documentation ¶
Index ¶
- func Agent() ssh.AuthMethod
- func ExecuteCommand(client *ssh.Client, cmd string) (string, error)
- func ReadPrivateKey(keyPath, password string) (auth ssh.AuthMethod, ok bool)
- func UploadFile(client *ssh.Client, localName string, remoteName string) error
- func WithinSession(client *ssh.Client, callback sshSessionCallback) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
ExecuteCommand executes a command in a new SSH session.
func ReadPrivateKey ¶
func ReadPrivateKey(keyPath, password string) (auth ssh.AuthMethod, ok bool)
ReadPrivateKey tries to read an SSH private key file.
func UploadFile ¶
UploadFile uploads a local file to the remote. Please avoid funky remote file names, since there's no protection against command injection
func WithinSession ¶
WithinSession executes a callback function within a new SSH session of the given client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.