Versions in this module Expand all Collapse all v1 v1.0.0 Oct 28, 2020 Changes in this version + func CheckPrivateSshConnection(t testing.TestingT, publicHost Host, privateHost Host, command string) string + func CheckPrivateSshConnectionE(t testing.TestingT, publicHost Host, privateHost Host, command string) (string, error) + func CheckSshCommand(t testing.TestingT, host Host, command string) string + func CheckSshCommandE(t testing.TestingT, host Host, command string) (string, error) + func CheckSshConnection(t testing.TestingT, host Host) + func CheckSshConnectionE(t testing.TestingT, host Host) error + func Close(t testing.TestingT, closeable Closeable, ignoreErrors ...string) + func FetchContentsOfFile(t testing.TestingT, host Host, useSudo bool, filePath string) string + func FetchContentsOfFileE(t testing.TestingT, host Host, useSudo bool, filePath string) (string, error) + func FetchContentsOfFiles(t testing.TestingT, host Host, useSudo bool, filePaths ...string) map[string]string + func FetchContentsOfFilesE(t testing.TestingT, host Host, useSudo bool, filePaths ...string) (map[string]string, error) + func NoOpHostKeyCallback(hostname string, remote net.Addr, key ssh.PublicKey) error + func ScpDirFrom(t testing.TestingT, options ScpDownloadOptions, useSudo bool) + func ScpDirFromE(t testing.TestingT, options ScpDownloadOptions, useSudo bool) error + func ScpFileFrom(t testing.TestingT, host Host, remotePath string, localDestination *os.File, ...) + func ScpFileFromE(t testing.TestingT, host Host, remotePath string, localDestination *os.File, ...) error + func ScpFileTo(t testing.TestingT, host Host, mode os.FileMode, remotePath, contents string) + func ScpFileToE(t testing.TestingT, host Host, mode os.FileMode, remotePath, contents string) error + type Closeable interface + Close func() error + type Host struct + CustomPort int + Hostname string + OverrideSshAgent *SshAgent + Password string + SshAgent bool + SshKeyPair *KeyPair + SshUserName string + type JumpHostSession struct + HostConnection ssh.Conn + HostVirtualConnection net.Conn + JumpHostClient *ssh.Client + func (jumpHost *JumpHostSession) Cleanup(t testing.TestingT) + type KeyPair struct + PrivateKey string + PublicKey string + func GenerateRSAKeyPair(t testing.TestingT, keySize int) *KeyPair + func GenerateRSAKeyPairE(t testing.TestingT, keySize int) (*KeyPair, error) + type ScpDownloadOptions struct + FileNameFilters []string + LocalDir string + MaxFileSizeMB int + RemoteDir string + RemoteHost Host + type SshAgent struct + func NewSshAgent(t testing.TestingT, socketDir string, socketFile string) (*SshAgent, error) + func SshAgentWithKeyPair(t testing.TestingT, keyPair *KeyPair) *SshAgent + func SshAgentWithKeyPairE(t testing.TestingT, keyPair *KeyPair) (*SshAgent, error) + func SshAgentWithKeyPairs(t testing.TestingT, keyPairs []*KeyPair) *SshAgent + func SshAgentWithKeyPairsE(t testing.TestingT, keyPairs []*KeyPair) (*SshAgent, error) + func (s *SshAgent) SocketFile() string + func (s *SshAgent) Stop() + type SshConnectionOptions struct + Address string + AuthMethods []ssh.AuthMethod + Command string + JumpHost *SshConnectionOptions + Port int + Username string + func (options *SshConnectionOptions) ConnectionString() string + type SshSession struct + Client *ssh.Client + Input *func(io.WriteCloser) + JumpHost *JumpHostSession + Options *SshConnectionOptions + Session *ssh.Session + func (sshSession *SshSession) Cleanup(t testing.TestingT)