Versions in this module Expand all Collapse all v0 v0.1.0 Jun 2, 2022 Changes in this version + const ConfigFilePerm + const KnownHostsFilePerm + const PrivateKeyFilePerm + type Config struct + func NewConfig(configFilePath string) Config + func NewConfigWithDefaultConfigFilePath() Config + func (c Config) AddOrReplaceHost(hostKey string, hostName string, identityFile string, user string, port int64) error + func (c Config) RemoveHostIfExists(hostKey string) error + func (c Config) UpdateHost(hostKey string, hostName *string, identityFile *string, user *string) error + type Keys struct + func NewKeys(SSHDir string) Keys + func NewKeysWithDefaultDir() Keys + func (k Keys) CreateOrReplacePEM(PEMName string, PEMContent string) (pathWritten string, err error) + func (k Keys) GetPEMFilePath(PEMName string) string + func (k Keys) RemovePEMIfExists(PEMName string) error + type KnownHosts struct + func NewKnownHosts(knownHostsFilePath string) KnownHosts + func NewKnownHostsWithDefaultKnownHostsFilePath() KnownHosts + func (k KnownHosts) AddOrReplace(hostname, algorithm, fingerprint string) error + func (k KnownHosts) RemoveIfExists(hostname string) error + type PortForwarder struct + func NewPortForwarder() PortForwarder + func (p PortForwarder) Forward(onReadyChan chan<- PortForwarderReadyResp, privateKeyBytes []byte, user string, ...) error + type PortForwarderReadyResp struct + Error error + LocalAddr string