Documentation
¶
Index ¶
- func CreateSSHKeyPair(folder, name string, numBits int) (string, string, error)
- func GenerateSSHKeyPair(bits int) (string, string, error)
- func GetSSHPublicKeyFingerprintMD5(publicKey string) (string, error)
- func LoadOrCreateSSHKeyPair(folder, name string) (string, string, error)
- func LoadSSHKeyPair(folder, name string) (string, string, error)
- type SSHConnIdentifier
- type SSHConnection
- type SSHConnectionPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSSHKeyPair ¶
func LoadOrCreateSSHKeyPair ¶
Types ¶
type SSHConnIdentifier ¶
SSHConnIdentifier uniquely identifies an SSH connection by its host, port, and user.
func NewSSHConnIdentifier ¶
func NewSSHConnIdentifier(host string, port int, user string) SSHConnIdentifier
NewSSHConnIdentifier creates and returns a new SSHConnIdentifier.
func (SSHConnIdentifier) String ¶
func (id SSHConnIdentifier) String() string
String returns a string representation of SSHConnIdentifier in the format user:port@host.
type SSHConnection ¶
SSHConnection represents an SSH connection with a client and its host.
type SSHConnectionPool ¶
type SSHConnectionPool struct {
// contains filtered or unexported fields
}
SSHConnectionPool manages a pool of SSH connections using a concurrent-safe map.
func GetSSHConnectionPool ¶
func GetSSHConnectionPool() *SSHConnectionPool
GetSSHConnectionPool initializes (if not already) and returns the singleton instance of SSHConnectionPool.
func (*SSHConnectionPool) GetConnection ¶
func (pool *SSHConnectionPool) GetConnection(id SSHConnIdentifier, config *ssh.ClientConfig) (*SSHConnection, error)
Click to show internal directories.
Click to hide internal directories.