Documentation ¶
Index ¶
- type Auth
- type AuthorizedKeyManager
- type AuthorizedKeyParserChecker
- type AuthorizedUser
- type FileReader
- type PTYManager
- type PTYWindowSizer
- type PrivateKeyManager
- type PrivateKeyParser
- type ServerAuther
- type ServerBuilder
- type Session
- type SessionExecShellManager
- type SessionManager
- func (s SessionManager) ManageExec(sshSession ssh.Session) error
- func (s SessionManager) ManageExecInEnv(sshSession ssh.Session) error
- func (s SessionManager) ManageShell(sshSession ssh.Session) error
- func (s SessionManager) ManageShellInEnv(sshSession ssh.Session) error
- func (s SessionManager) ManageShellPTY(sshSession ssh.Session) error
- func (s SessionManager) ManageShellPTYInEnv(sshSession ssh.Session) error
- type UserCommandBuilder
- type UserCommandManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuth ¶
func NewAuth( fileManager FileReader, privateKeyManager PrivateKeyParser, authorizedKeyManager AuthorizedKeyParserChecker, hostKeyFilePath string, authorizedUsers []AuthorizedUser, ) *Auth
type AuthorizedKeyManager ¶
type AuthorizedKeyManager struct{}
func NewAuthorizedKeyManager ¶
func NewAuthorizedKeyManager() AuthorizedKeyManager
func (AuthorizedKeyManager) CheckPublicKeyEqualsAuthorizedKey ¶
func (AuthorizedKeyManager) ParseAuthorizedKeys ¶
func (AuthorizedKeyManager) ParseAuthorizedKeys( authorizedKeysBytes []byte, ) ([]ssh.PublicKey, error)
type AuthorizedUser ¶
type FileReader ¶
type PTYManager ¶
type PTYManager struct{}
func NewPTYManager ¶
func NewPTYManager() PTYManager
func (PTYManager) SetWindowSize ¶
func (PTYManager) SetWindowSize(f *os.File, width, height int)
type PTYWindowSizer ¶
type PrivateKeyManager ¶
type PrivateKeyManager struct{}
func NewPrivateKeyManager ¶
func NewPrivateKeyManager() PrivateKeyManager
func (PrivateKeyManager) ParsePrivateKey ¶
func (PrivateKeyManager) ParsePrivateKey( privateKeyBytes []byte, ) (ssh.Signer, error)
type PrivateKeyParser ¶
type ServerAuther ¶
type ServerBuilder ¶
type ServerBuilder struct {
// contains filtered or unexported fields
}
func NewServerBuilder ¶
func NewServerBuilder( auth ServerAuther, listenAddr string, ) ServerBuilder
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession( manager SessionExecShellManager, ) Session
type SessionExecShellManager ¶
type SessionExecShellManager interface { ManageShellInEnv(sshSession ssh.Session) error ManageShellPTYInEnv(sshSession ssh.Session) error ManageExecInEnv(sshSession ssh.Session) error ManageShellPTY(sshSession ssh.Session) error ManageShell(sshSession ssh.Session) error ManageExec(sshSession ssh.Session) error }
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager( userCommandBuilder UserCommandBuilder, ptyManager PTYWindowSizer, ) SessionManager
func (SessionManager) ManageExec ¶
func (s SessionManager) ManageExec(sshSession ssh.Session) error
func (SessionManager) ManageExecInEnv ¶
func (s SessionManager) ManageExecInEnv(sshSession ssh.Session) error
func (SessionManager) ManageShell ¶
func (s SessionManager) ManageShell(sshSession ssh.Session) error
func (SessionManager) ManageShellInEnv ¶
func (s SessionManager) ManageShellInEnv(sshSession ssh.Session) error
func (SessionManager) ManageShellPTY ¶
func (s SessionManager) ManageShellPTY(sshSession ssh.Session) error
func (SessionManager) ManageShellPTYInEnv ¶
func (s SessionManager) ManageShellPTYInEnv(sshSession ssh.Session) error
type UserCommandBuilder ¶
type UserCommandManager ¶
type UserCommandManager struct {
// contains filtered or unexported fields
}
func NewUserCommandManager ¶
func NewUserCommandManager( user *user.User, ) UserCommandManager
func (UserCommandManager) BuildShell ¶
func (u UserCommandManager) BuildShell() *exec.Cmd
func (UserCommandManager) BuildShellPTY ¶
func (u UserCommandManager) BuildShellPTY() *exec.Cmd
Click to show internal directories.
Click to hide internal directories.