Documentation
¶
Index ¶
- Constants
- Variables
- func GetSSHAgentClient() (agent.ExtendedAgent, error)
- func GetSSHClientConfig(cc *ClientConfigParameters) (*ssh.ClientConfig, error)
- type ClientConfigParameters
- type SSHClient
- func (s *SSHClient) Connect(addr string, config *ssh.ClientConfig) error
- func (s *SSHClient) Dial(addr string, config *ssh.ClientConfig) (*SSHClient, error)
- func (s *SSHClient) DialWithProxies(ccp *ClientConfigParameters) (*SSHClient, error)
- func (s *SSHClient) Disconnect() error
- func (s *SSHClient) GetConn() *ssh.Client
- func (s *SSHClient) Listen(network string, address string) (net.Listener, error)
- func (s *SSHClient) NewSCPClientFromExistingSSH() (*scp.Client, error)
- func (s *SSHClient) NewSession() (*ssh.Session, error)
- func (s *SSHClient) NewSessionShellWithOpts(opts *SessOpts) (*ssh.Session, error)
- func (s *SSHClient) StartIPC() (*ipc.IPCConsumer, error)
- type SSHClientEvent
- type SSHClientEventType
- type SessOpts
Constants ¶
View Source
const ( SSHClientEventDialing = iota SSHClientEventConnected SSHClientEventMasterClosed SSHClientEventClosed SSHClientEventError )
Variables ¶
View Source
var NewSSHClient = func() *SSHClient { c := &SSHClient{} c.Events = make(chan *SSHClientEvent, 10) c.Env = make(map[string]string) return c }
Functions ¶
func GetSSHAgentClient ¶
func GetSSHAgentClient() (agent.ExtendedAgent, error)
func GetSSHClientConfig ¶
func GetSSHClientConfig(cc *ClientConfigParameters) (*ssh.ClientConfig, error)
Types ¶
type ClientConfigParameters ¶
type ClientConfigParameters struct { Target *string `json:"target" validate:"required"` Port uint16 `json:"port"` // Username *string `json:"username" validate:"required"` PrivateKey *string `json:"privkey"` PrivateKeyPath *string `json:"privkeyPath"` PrivateKeyPassphrase *string `json:"passphrase"` Password *string `json:"password"` // Proxies []*ClientConfigParameters `json:"proxies"` }
type SSHClient ¶
type SSHClient struct { DialAddr string // will be shared between clients Events chan *SSHClientEvent Env map[string]string // contains filtered or unexported fields }
sshClient obj
func (*SSHClient) Connect ¶
func (s *SSHClient) Connect(addr string, config *ssh.ClientConfig) error
Connect func
func (*SSHClient) DialWithProxies ¶
func (s *SSHClient) DialWithProxies(ccp *ClientConfigParameters) (*SSHClient, error)
func (*SSHClient) NewSCPClientFromExistingSSH ¶
func (*SSHClient) NewSessionShellWithOpts ¶
type SSHClientEvent ¶
type SSHClientEvent struct { Type SSHClientEventType Error error SSHClient *SSHClient }
type SSHClientEventType ¶
type SSHClientEventType int
Click to show internal directories.
Click to hide internal directories.