Documentation
¶
Index ¶
Constants ¶
View Source
const ( SystemConfigFile = "/etc/ssh/ssh_config" SystemKnownHostsFile = "/etc/ssh/ssh_known_hosts" UserConfigFile = ".ssh/config" UserKnownHostsFile = ".ssh/known_hosts" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
An SSH agent client manager. This will connect to an already-running SSH agent, or it will attempt to spin one up internally and set it as the process.
func NewAgentManager ¶
func NewAgentManager(log logger.Logger) (*AgentManager, error)
func (*AgentManager) Add ¶
func (m *AgentManager) Add(key any, comment string) error
Add a key to the SSH agent.
If it already exists in the agent, then it will not be added.
For SSH servers connecting to an existing client, all explicitly added keys will be removed from the client when the manager is stopped.
func (*AgentManager) Client ¶
func (m *AgentManager) Client() agent.ExtendedAgent
Return the instantiated client.
func (*AgentManager) Stop ¶
func (m *AgentManager) Stop() error
Release any resources associated with the SSH agent client manager. This stops the internal agent server if it is running as well.
type UserHostPort ¶
func ParseUserHostPort ¶
func ParseUserHostPort(s string) (*UserHostPort, error)
Click to show internal directories.
Click to hide internal directories.