SVCS - English Documentation
Loading...
Searching...
No Matches
svcs::server::ssh::SSHServer Class Reference

Main SSH server class. More...

#include <SSHServer.hxx>

Public Member Functions

 SSHServer (const SSHConfig &config, std::shared_ptr< svcs::core::RepositoryManager > repo_manager, std::shared_ptr< svcs::services::ISubject > event_bus)
 Constructor.
 ~SSHServer ()
 Destructor.
 SSHServer (const SSHServer &)=delete
SSHServeroperator= (const SSHServer &)=delete
bool start ()
 Start server.
void stop ()
 Stop server.
bool isRunning () const
 Check if running.
size_t getActiveConnections () const
 Get active connections.
void addUserKey (const std::string &username, const std::string &public_key)
 Add public key for user.
void setUserPassword (const std::string &username, const std::string &password)
 Set password for user.

Detailed Description

Main SSH server class.

Manages SSH connections and executes repository operations

Constructor & Destructor Documentation

◆ SSHServer()

svcs::server::ssh::SSHServer::SSHServer ( const SSHConfig & config,
std::shared_ptr< svcs::core::RepositoryManager > repo_manager,
std::shared_ptr< svcs::services::ISubject > event_bus )

Constructor.

Parameters
configServer configuration
repo_managerRepository manager
event_busEvent bus

Member Function Documentation

◆ addUserKey()

void svcs::server::ssh::SSHServer::addUserKey ( const std::string & username,
const std::string & public_key )

Add public key for user.

Parameters
usernameUsername
public_keyPublic key in OpenSSH format

◆ getActiveConnections()

size_t svcs::server::ssh::SSHServer::getActiveConnections ( ) const

Get active connections.

Returns
Connection count

◆ isRunning()

bool svcs::server::ssh::SSHServer::isRunning ( ) const
inline

Check if running.

Returns
true if running

◆ setUserPassword()

void svcs::server::ssh::SSHServer::setUserPassword ( const std::string & username,
const std::string & password )

Set password for user.

Parameters
usernameUsername
passwordPlain text password

◆ start()

bool svcs::server::ssh::SSHServer::start ( )

Start server.

Returns
true if started

The documentation for this class was generated from the following files: