Documentation ¶
Overview ¶
Package ssh provides SSH facilities on top of OpenSSH. It may additionally extend to support other SSH implementations.
Index ¶
Constants ¶
const ( // PrompterEnvironmentVariable is the environment variable in which the // Mutagen prompter identifier is stored. PrompterEnvironmentVariable = "MUTAGEN_SSH_PROMPTER" )
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command create an SSH process set to connect to the specified remote and invoke the specified command. This function does not start the process. If a prompter is provided, the process will be directed to use it on startup if necessary. The command string is interpreted as literal input to the remote shell, so its contents are more flexible than just an executable name or path. The path component of the remote URL is NOT used as a working directory and is simply ignored - the command will execute in whatever default directory the server chooses.
func Copy ¶
Copy copies a local file (which MUST be an absolute path) to a remote destination. If a prompter is provided, this method will attempt to use it for authentication if necessary.
func Output ¶
Output creates an SSH command by forwarding its arguments to Command and then returning the results of its Output method. If there is an error creating the command, it will be returned, but otherwise the result of the Run method will be returned un-wrapped, so it can be treated as an os/exec.ExitError.
func Run ¶
Run creates an SSH command by forwarding its arguments to Command and then returning the result of its Run method. If there is an error creating the command, it will be returned, but otherwise the result of the Run method will be returned un-wrapped, so it can be treated as an os/exec.ExitError.
Types ¶
This section is empty.