libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::server::TestServer Class Reference

#include <test_server.hpp>

Classes

struct  Options
 

Public Member Functions

 TestServer (Options options)
 
 ~TestServer ()
 
 TestServer (const TestServer &)=delete
 
TestServeroperator= (const TestServer &)=delete
 
std::uint16_t port () const noexcept
 
const Keyhost_key () const noexcept
 
Fingerprint host_key_fingerprint (HashType type=HashType::sha256) const
 
SessionOptions client_options () const
 
std::filesystem::path known_hosts_file () const
 

Detailed Description

A complete SSH server on 127.0.0.1:<ephemeral>, running on its own thread(s). Generates a throwaway ed25519 host key in memory. See docs/design/08 ยง8.8.

Constructor & Destructor Documentation

◆ TestServer() [1/2]

SSHPP_INLINE sshpp::server::TestServer::TestServer ( Options  options)
explicit

◆ ~TestServer()

SSHPP_INLINE sshpp::server::TestServer::~TestServer ( )

◆ TestServer() [2/2]

sshpp::server::TestServer::TestServer ( const TestServer )
delete

Member Function Documentation

◆ operator=()

TestServer & sshpp::server::TestServer::operator= ( const TestServer )
delete

◆ port()

std::uint16_t sshpp::server::TestServer::port ( ) const
inlinenoexcept

◆ host_key()

const Key & sshpp::server::TestServer::host_key ( ) const
inlinenoexcept

◆ host_key_fingerprint()

SSHPP_INLINE Fingerprint sshpp::server::TestServer::host_key_fingerprint ( HashType  type = HashType::sha256) const

◆ client_options()

SSHPP_INLINE SessionOptions sshpp::server::TestServer::client_options ( ) const

Ready-made client options pointing at this server (password/pubkey auth is still the caller's job to configure and perform).

◆ known_hosts_file()

std::filesystem::path sshpp::server::TestServer::known_hosts_file ( ) const
inline

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