SVCS - English Documentation
Loading...
Searching...
No Matches
SSHConfig.hxx
Go to the documentation of this file.
1
15#pragma once
16
17#include <string>
18#include <cstdint>
19
20namespace svcs::server::ssh {
21
23 * @english
24 * @struct SSHConfig
25 * @brief SSH server configuration
26 *
27 * @russian
28 * @struct SSHConfig
29 * @brief Конфигурация SSH сервера
30 */
31struct SSHConfig {
32 std::string host = "0.0.0.0";
33 uint16_t port = 2222;
34 std::string host_key;
35 std::string auth_file;
36 std::string keys_dir = "/etc/svcs/ssh/keys";
37 std::string passwd_dir = "/etc/svcs/ssh";
38 size_t max_connections = 256;
39 int timeout_sec = 300;
40
42
52 static SSHConfig load(const std::string& path);
53
65 bool save(const std::string& path) const;
66
76 bool validate() const;
77};
78
79} // namespace svcs::server::ssh
SSH server configuration.
Definition SSHConfig.hxx:23
bool save(const std::string &path) const
Save to file.
Definition SSHConfig.cxx:78
bool validate() const
Validate configuration.
Definition SSHConfig.cxx:97