SSH configuration path (#84)

SSH configuration
This commit is contained in:
Christian Visintin
2021-12-11 21:43:23 +01:00
parent 9284f101c8
commit e6ba4d8430
18 changed files with 155 additions and 9 deletions

View File

@@ -36,6 +36,7 @@ use remotefs::client::{
ssh::{ScpFs, SftpFs, SshOpts},
};
use remotefs::RemoteFs;
use std::path::PathBuf;
/// Remotefs builder
pub struct Builder;
@@ -117,6 +118,9 @@ impl Builder {
if let Some(password) = params.password {
opts = opts.password(password);
}
if let Some(config_path) = config_client.get_ssh_config() {
opts = opts.config_file(PathBuf::from(config_path));
}
opts
}