Documentation ¶
Index ¶
- func CopyFromRemote(ctx context.Context, host *RemoteHost, remoteFile *RemoteFile, ...) (stderr string, err error)
- func CopyToRemote(ctx context.Context, host *RemoteHost, file *RemoteFile) (combinedOutput string, err error)
- func ExecuteRemote(ctx context.Context, host *RemoteHost, script string) (combinedOutput string, err error)
- func PublicKeyAuth(sshPrivateKeyPath string) (ssh.AuthMethod, error)
- func ValidateConfig(host *JumpBox) error
- type AuthConfig
- type JumpBox
- type RemoteFile
- type RemoteHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFromRemote ¶
func CopyFromRemote(ctx context.Context, host *RemoteHost, remoteFile *RemoteFile, destinationPath string) (stderr string, err error)
CopyFromRemote copies a remote file to the local host.
Context ctx is only enforced during the process that establishes the SSH connection and creates the SSH client.
func CopyToRemote ¶
func CopyToRemote(ctx context.Context, host *RemoteHost, file *RemoteFile) (combinedOutput string, err error)
CopyToRemote copies a file to a remote host.
Context ctx is only enforced during the process that establishes the SSH connection and creates the SSH client.
func ExecuteRemote ¶
func ExecuteRemote(ctx context.Context, host *RemoteHost, script string) (combinedOutput string, err error)
ExecuteRemote executes a script in a remote host.
Context ctx is only enforced during the process that stablishes the SSH connection and creates the SSH client.
func PublicKeyAuth ¶
func PublicKeyAuth(sshPrivateKeyPath string) (ssh.AuthMethod, error)
PublicKeyAuth returns an AuthMethod that uses a ssh key pair
func ValidateConfig ¶
ValidateConfig checks the JumpBox configuration
Types ¶
type AuthConfig ¶
type JumpBox ¶
type JumpBox struct { URI string Port int OperatingSystem api.OSType AuthConfig *AuthConfig }
type RemoteFile ¶
func NewRemoteFile ¶
func NewRemoteFile(path, permissions, owner string, content []byte) *RemoteFile
type RemoteHost ¶
Click to show internal directories.
Click to hide internal directories.