File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -663,6 +663,14 @@ impl Session {
663
663
& value as * const _ as _ ,
664
664
)
665
665
} ,
666
+ SshOption :: GlobalKnownHosts ( known_hosts) => unsafe {
667
+ let known_hosts = opt_string_to_cstring ( known_hosts) ;
668
+ sys:: ssh_options_set (
669
+ * * sess,
670
+ sys:: ssh_options_e:: SSH_OPTIONS_GLOBAL_KNOWNHOSTS ,
671
+ opt_cstring_to_cstr ( & known_hosts) as _ ,
672
+ )
673
+ } ,
666
674
} ;
667
675
668
676
if res == 0 {
@@ -1339,6 +1347,10 @@ pub enum SshOption {
1339
1347
CiphersSC ( String ) ,
1340
1348
/// Set it to false to disable automatic processing of per-user and system-wide OpenSSH configuration files.
1341
1349
ProcessConfig ( bool ) ,
1350
+ /// Set the global known hosts file name
1351
+ /// If the value is None, the directory is set to the default known hosts file, normally /etc/ssh/ssh_known_hosts.
1352
+ /// The known hosts file is used to certify remote hosts are genuine.
1353
+ GlobalKnownHosts ( Option < String > ) ,
1342
1354
}
1343
1355
1344
1356
/// Indicates the state of known-host matching, an important set
You can’t perform that action at this time.
0 commit comments