Documentation
¶
Overview ¶
Package ssh provides utility functions for interfacing with OpenSSH.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressionFlag ¶ added in v0.13.0
func CompressionFlag() string
CompressionFlag returns a flag that can be passed to scp or ssh to enable compression. Note that while SSH does have a CompressionLevel configuration option, this only applies to SSHv1. SSHv2 defaults to a DEFLATE level of 6, which is what we want anyway.
func ConnectTimeoutFlag ¶ added in v0.13.0
ConnectTimeoutFlag returns a flag that can be passed to scp or ssh to limit connection time. The provided timeout is in seconds. The timeout must be greater than 0, otherwise this function will panic.
func SCPCommand ¶ added in v0.13.0
SCPCommand prepares (but does not start) an SCP command with the specified arguments and scoped to lifetime of the provided context.
func SSHCommand ¶ added in v0.13.0
SSHCommand prepares (but does not start) an SSH command with the specified arguments and scoped to lifetime of the provided context.
func ServerAliveFlags ¶ added in v0.13.0
ServerAliveFlags returns a set of flags that can be passed to scp or ssh to enable use of server alive messages. The provided interval is in seconds. Both the interval and count must be greater than 0, otherwise this function will panic.
Types ¶
This section is empty.