Documentation ¶
Index ¶
- Variables
- type AuthenticationHandler
- type Client
- func (client *Client) CloseSession()
- func (client *Client) Connect(ctx context.Context, addr string, policy pan.Policy, selector string) error
- func (client *Client) ConnectPipes(reader io.Reader, writer io.Writer) error
- func (client *Client) Dial(addr string) (io.ReadWriteCloser, error)
- func (client *Client) RunSession(cmd string) error
- func (client *Client) Shell() error
- func (client *Client) StartSession(cmd string) error
- func (client *Client) StartTunnel(local netaddr.IPPort, addr string) error
- func (client *Client) WaitSession() error
- type VerifyHostKeyHandler
Constants ¶
This section is empty.
Variables ¶
var (
AvailablePathSelectors = []string{"default", "ping", "round-robin", "random"}
)
Functions ¶
This section is empty.
Types ¶
type AuthenticationHandler ¶
AuthenticationHandler is a function that represents an authentication method.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct representing an SSH client. It consists of a connection to the server, and at most one terminal session (per SSH specification, a connection may not serve multiple sessions)
func Create ¶
func Create(username string, config *clientconfig.ClientConfig, passAuthHandler AuthenticationHandler, verifyNewKeyHandler VerifyHostKeyHandler) (*Client, error)
Create creates a new unconnected Client.
func (*Client) CloseSession ¶
func (client *Client) CloseSession()
CloseSession closes the current session
func (*Client) Connect ¶
func (client *Client) Connect(ctx context.Context, addr string, policy pan.Policy, selector string) error
Connect connects the Client to the given address.
func (*Client) ConnectPipes ¶
ConnectPipes connects the given reader and writer to the session's in- and output
func (*Client) Dial ¶
func (client *Client) Dial(addr string) (io.ReadWriteCloser, error)
Dial dials the given address over a tunnel to the server. If the given address is a SCION address, QUIC is used; else TCP.
func (*Client) RunSession ¶
RunSession runs a terminal session, waiting for it to end.
func (*Client) StartSession ¶
StartSession starts a terminal session, not waiting for it to end.
func (*Client) StartTunnel ¶
StartTunnel creates a new tunnel to the given address, forwarding all connections on the given port over the server to the given address. If the given address is a SCION address, QUIC is used; else TCP.
func (*Client) WaitSession ¶
WaitSession waits for a terminal session to end.
Directories ¶
Path | Synopsis |
---|---|
Package knownhosts implements a parser for the OpenSSH known_hosts host key database.
|
Package knownhosts implements a parser for the OpenSSH known_hosts host key database. |