Versions in this module Expand all Collapse all v1 v1.2.25 May 4, 2026 Changes in this version + const TelnetDO + const TelnetDONT + const TelnetEcho + const TelnetEnvironment + const TelnetIAC + const TelnetLinemode + const TelnetRemoteFlowControl + const TelnetSB + const TelnetSE + const TelnetStatus + const TelnetSuppressGoAhead + const TelnetTerminalSpeed + const TelnetTerminalType + const TelnetTimingMark + const TelnetWILL + const TelnetWONT + const TelnetWindowSize + func LoadAuthorizedKeysFromFile(path string) ([]ssh.PublicKey, error) + func ParseAuthorizedKeys(data []byte, pathHint string) ([]ssh.PublicKey, error) + func ServeSSH(ctx context.Context, ln net.Listener, opts SSHServerOptions) error + func ServeTelnet(ctx context.Context, ln net.Listener, opts SSHServerOptions) error + type CLIMode int + const ModeConfig + const ModeEnable + const ModeLogin + const ModeUser + type CLISession struct + func NewCLISession(conn ssh.Channel, username, password string, logger *zap.Logger, vendor vendor) *CLISession + func NewCLISessionWithAuth(conn ssh.Channel, username, password string, logger *zap.Logger) *CLISession + func (s *CLISession) Run(ctx context.Context) error + type CLIState struct + func NewCLIState(username, password string) *CLIState + func NewCLIStateWithAuth(username, password string) *CLIState + func (s *CLIState) NewMode(mode CLIMode) + func (s *CLIState) NewSubMode(mode string) + type SSHServerOptions struct + AuthorizedKeys []ssh.PublicKey + ConnectionErrorProb float64 + Logger *zap.Logger + Password string + Username string + type TelnetConnection struct + func (t *TelnetConnection) Close() error + func (t *TelnetConnection) CloseWrite() error + func (t *TelnetConnection) Read(data []byte) (n int, err error) + func (t *TelnetConnection) SendRequest(name string, wantReply bool, payload []byte) (bool, error) + func (t *TelnetConnection) Stderr() io.ReadWriter + func (t *TelnetConnection) Write(data []byte) (n int, err error)