21 #define SSH_MAX_HOSTS_FILES 32
22 #define MAX_CANON_DOMAINS 32
23 #define PATH_MAX_SUN (sizeof((struct sockaddr_un *)0)->sun_path)
25 struct allowed_cname {
32 char *forward_agent_sock_path;
34 int forward_x11_timeout;
35 int forward_x11_trusted;
36 int exit_on_forward_failure;
38 struct ForwardOptions fwd_opts;
39 int pubkey_authentication;
40 int hostbased_authentication;
41 int challenge_response_authentication;
43 int gss_authentication;
47 int gss_renewal_rekey;
48 char *gss_client_identity;
49 char *gss_server_identity;
50 char *gss_kex_algorithms;
51 int password_authentication;
53 int kbd_interactive_authentication;
54 char *kbd_interactive_devices;
57 int strict_host_key_checking;
64 int ip_qos_interactive;
66 SyslogFacility log_facility;
68 u_int num_log_verbose;
72 int connection_attempts;
74 int connection_timeout;
76 int number_of_password_prompts;
80 char *hostkeyalgorithms;
82 char *ca_sign_algorithms;
91 u_int num_system_hostfiles;
92 char *system_hostfiles[SSH_MAX_HOSTS_FILES];
93 u_int num_user_hostfiles;
94 char *user_hostfiles[SSH_MAX_HOSTS_FILES];
95 char *preferred_authentications;
98 char *pkcs11_provider;
100 int verify_host_key_dns;
102 int num_identity_files;
103 char *identity_files[SSH_MAX_IDENTITY_FILES];
104 int identity_file_userprovided[SSH_MAX_IDENTITY_FILES];
105 struct sshkey *identity_keys[SSH_MAX_IDENTITY_FILES];
107 int num_certificate_files;
108 char *certificate_files[SSH_MAX_CERTIFICATE_FILES];
109 int certificate_file_userprovided[SSH_MAX_CERTIFICATE_FILES];
110 struct sshkey *certificates[SSH_MAX_CERTIFICATE_FILES];
112 int add_keys_to_agent;
113 int add_keys_to_agent_lifespan;
114 char *identity_agent;
117 int num_local_forwards;
118 struct Forward *local_forwards;
121 int num_remote_forwards;
122 struct Forward *remote_forwards;
123 int clear_forwardings;
126 char **permitted_remote_opens;
127 u_int num_permitted_remote_opens;
130 char *stdio_forward_host;
131 int stdio_forward_port;
133 int enable_ssh_keysign;
138 int disable_multithreaded;
141 int no_host_authentication_for_localhost;
143 int server_alive_interval;
144 int server_alive_count_max;
154 int control_persist_timeout;
156 int hash_known_hosts;
163 int permit_local_command;
164 char *remote_command;
169 int proxy_use_fdpass;
171 int num_canonical_domains;
172 char *canonical_domains[MAX_CANON_DOMAINS];
173 int canonicalize_hostname;
174 int canonicalize_max_dots;
175 int canonicalize_fallback_local;
176 int num_permitted_cnames;
177 struct allowed_cname permitted_cnames[MAX_CANON_DOMAINS];
179 char *revoked_host_keys;
181 int fingerprint_hash;
185 char *hostbased_accepted_algos;
186 char *pubkey_accepted_algos;
193 char *known_hosts_command;
195 char *ignored_unknown;
198 #define SSH_CANONICALISE_NO 0
199 #define SSH_CANONICALISE_YES 1
200 #define SSH_CANONICALISE_ALWAYS 2
202 #define SSHCTL_MASTER_NO 0
203 #define SSHCTL_MASTER_YES 1
204 #define SSHCTL_MASTER_AUTO 2
205 #define SSHCTL_MASTER_ASK 3
206 #define SSHCTL_MASTER_AUTO_ASK 4
208 #define REQUEST_TTY_AUTO 0
209 #define REQUEST_TTY_NO 1
210 #define REQUEST_TTY_YES 2
211 #define REQUEST_TTY_FORCE 3
213 #define SSHCONF_CHECKPERM 1
214 #define SSHCONF_USERCONF 2
215 #define SSHCONF_FINAL 4
216 #define SSHCONF_NEVERMATCH 8
218 #define SSH_UPDATE_HOSTKEYS_NO 0
219 #define SSH_UPDATE_HOSTKEYS_YES 1
220 #define SSH_UPDATE_HOSTKEYS_ASK 2
222 #define SSH_STRICT_HOSTKEY_OFF 0
223 #define SSH_STRICT_HOSTKEY_NEW 1
224 #define SSH_STRICT_HOSTKEY_YES 2
225 #define SSH_STRICT_HOSTKEY_ASK 3
227 const char *kex_default_pk_alg(
void);
228 char *ssh_connection_hash(
const char *thishost,
const char *host,
229 const char *portstr,
const char *user);
230 void initialize_options(Options *);
231 int fill_default_options(Options *);
232 void fill_default_options_for_canonicalization(Options *);
233 void free_options(Options *o);
234 int process_config_line(Options *,
struct passwd *,
const char *,
235 const char *,
char *,
const char *,
int,
int *,
int);
236 int read_config_file(
const char *,
struct passwd *,
const char *,
237 const char *, Options *,
int,
int *);
238 int parse_forward(
struct Forward *,
const char *,
int,
int);
239 int parse_jump(
const char *, Options *,
int);
240 int parse_ssh_uri(
const char *,
char **,
char **,
int *);
241 int default_ssh_port(
void);
242 int option_clear_or_none(
const char *);
243 void dump_client_config(Options *o,
const char *host);
245 void add_local_forward(Options *,
const struct Forward *);
246 void add_remote_forward(Options *,
const struct Forward *);
247 void add_identity_file(Options *,
const char *,
const char *,
int);
248 void add_certificate_file(Options *,
const char *,
int);