Documentation ¶
Index ¶
- Variables
- func DirectTCPIPHandler(ctx context.Context, srv *Server, conn *gossh.ServerConn, ...)
- func InitDebug(kr *mesh.KRun)
- func InitFromSecret(sshCM map[string][]byte, ns string)
- func KeysEqual(ak, bk gossh.PublicKey) bool
- type ForwardedTCPHandler
- type Pty
- type SSHDConfig
- type Server
- type Signal
- type Window
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEOF is the error when the terminal exits ErrEOF = errors.New("EOF") )
Functions ¶
func DirectTCPIPHandler ¶
func DirectTCPIPHandler(ctx context.Context, srv *Server, conn *gossh.ServerConn, newChan gossh.NewChannel)
DirectTCPIPHandler can be enabled by adding it to the server's ChannelHandlers under direct-tcpip.
func InitFromSecret ¶
InitFromSecret is a helper method to init the sshd using a secret or CA address
Types ¶
type ForwardedTCPHandler ¶
ForwardedTCPHandler can be enabled by creating a ForwardedTCPHandler and adding the HandleSSHRequest callback to the server's RequestHandlers under tcpip-forward and cancel-tcpip-forward.
func (*ForwardedTCPHandler) HandleSSHRequest ¶
func (h *ForwardedTCPHandler) HandleSSHRequest(ctx context.Context, srv *Server, req *gossh.Request, conn *gossh.ServerConn) (bool, []byte)
type SSHDConfig ¶
type SSHDConfig struct {
Port int
}
type Server ¶
type Server struct { Port int Shell string AuthorizedKeys []gossh.PublicKey CertChecker *gossh.CertChecker Address string Listener net.Listener // contains filtered or unexported fields }
func NewSSHTransport ¶
func (*Server) AddAuthorized ¶
func (*Server) AddAuthorizedFile ¶
func (*Server) AddAuthorizedKeys ¶
func (*Server) HandleServerConn ¶
Handles a connection as SSH server, using a net.Conn - which might be tunneled over other transports. SSH handles multiplexing and packets.
Click to show internal directories.
Click to hide internal directories.