angelos.lib.net.server

Module docstring.

class angelos.lib.net.server.Server(ioc: angelos.lib.ioc.Container, mode: int = 1, subsystems: List[angelos.lib.net.subsystem.ServerSubsystemHandler] = None, terminal: angelos.lib.net.server.ServerTerminal = None)

Bases: angelos.lib.ioc.ContainerAware, asyncssh.server.SSHServer

Server base class.

begin_auth(username: unicode) → bool

Prepare for authentication of user.

clean_up()

Clean up dead connections.

connection_lost(exc)

Clean up among connections if one is lost

connection_made(conn)

Remember latest connection.

connection_requested(dest_host, dest_port, orig_host, orig_port)

Run a new TCP session that handles an SSH client connection

kick_out(username: unicode)

Kick out user.

classmethod start(ioc: angelos.lib.ioc.Container, mode: int = 1, port: int = 8022, host_keys=['ssh_host_key'], auth_client_keys='authorized_keys')angelos.lib.net.server.Server

Creates an asynchronous SSH server.

validate_public_key(username, key)

Validate public key.

class angelos.lib.net.server.ServerSession(ioc, subsystems: List[angelos.lib.net.subsystem.ServerSubsystemHandler] = None, terminal: angelos.lib.net.server.ServerTerminal = None)

Bases: angelos.lib.ioc.ContainerAware, asyncssh.stream.SSHStreamSession, asyncssh.session.SSHServerSession

Server session base class.

break_received(msec) → bool

Handle an incoming break on the channel

pty_requested(term_type, term_size, term_modes) → bool

Find out if server allows a terminal.

session_started()

Start a session for this newly opened server channel

signal_received(signal)

Handle an incoming signal on the channel

soft_eof_received()

Handle an incoming soft EOF on the channel

subsystem_requested(subsystem: unicode) → bool

Find out if certain subsystem is available.

terminal_size_changed(width: int, height: int, pixwidth: int, pixheight: int)

Handle an incoming terminal size change on the channel

class angelos.lib.net.server.ServerTerminal

Bases: object

class angelos.lib.net.server.SessionOptions

Bases: object

Session access options.

ROLE_ADMIN = 1
ROLE_CLIENT = 3
ROLE_HOST = 2
ROLE_NODE = 5
ROLE_NONE = 0