Internal Architecture

The ContainerSSH internal architecture consists of two main parts: the SSH server and the backends.

The SSH server is located in the The server can be instantiated using the NewServer() method.

This method will take an implementation of the authentication client that is performing the authentication. The interface for the client is defined in It must implement two methods for password and public key authentication.

It will also take a client implementation for the configuration. The interface is defined in It must implement a single method to fetch the configuration.

The final significant method is the backend registry. The backend is fetched based on the configuration in the config file or from the config server.

The backend is a structure of Backend defined in The CreateSession method takes the details of the current connection and returns a session implementation.

The session implementation defines the handler methods for individual SSH events like setting environment variables or executing commands.