feat: ssh-agent (#264)

This commit is contained in:
Christian Visintin
2024-07-09 11:55:17 +02:00
committed by GitHub
parent f3b84c97e1
commit 179c4de4ed
4 changed files with 629 additions and 126 deletions

View File

@@ -40,6 +40,7 @@
Released on ??
- [Issue 226](https://github.com/veeso/termscp/issues/226): Use ssh-agent
- [Issue 241](https://github.com/veeso/termscp/issues/241): Jump to next entry after select
- [Issue 255](https://github.com/veeso/termscp/issues/255): New keybindings `Ctrl + Shift + A` to deselect all files
- [Issue 257](https://github.com/veeso/termscp/issues/257): CLI remote args cannot handle '@' in the username

741
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -45,7 +45,7 @@ content_inspector = "^0.2"
dirs = "^5.0"
edit = "^0.1"
filetime = "^0.2"
hostname = "^0.3"
hostname = "^0.4"
keyring = { version = "^2.0", optional = true }
lazy-regex = "^3.1"
lazy_static = "^1.4"
@@ -62,7 +62,7 @@ remotefs-aws-s3 = { version = "^0.2.4", default-features = false, features = [
] }
remotefs-webdav = "^0.1.1"
rpassword = "^7.0"
self_update = { version = "^0.37", default-features = false, features = [
self_update = { version = "^0.41", default-features = false, features = [
"rustls",
"archive-tar",
"archive-zip",
@@ -78,7 +78,7 @@ toml = "^0.8"
tui-realm-stdlib = "^1.3.1"
tuirealm = "^1.9.1"
unicode-width = "^0.1"
version-compare = "^0.1"
version-compare = "^0.2"
whoami = "^1.4"
wildmatch = "^2.1"
@@ -101,12 +101,12 @@ remotefs-smb = { version = "^0.2", optional = true }
[target."cfg(target_family = \"windows\")"]
[target."cfg(target_family = \"windows\")".dependencies]
remotefs-ftp = { version = "^0.1.2", features = ["native-tls"] }
remotefs-ssh = "^0.2"
remotefs-ssh = "^0.3"
[target."cfg(target_family = \"unix\")"]
[target."cfg(target_family = \"unix\")".dependencies]
remotefs-ftp = { version = "^0.1.2", features = ["vendored", "native-tls"] }
remotefs-ssh = { version = "^0.2", features = ["ssh2-vendored"] }
remotefs-ssh = { version = "^0.3", features = ["ssh2-vendored"] }
users = "0.11.0"
[profile.dev]

View File

@@ -11,7 +11,7 @@ use remotefs_ftp::FtpFs;
use remotefs_smb::SmbOptions;
#[cfg(smb)]
use remotefs_smb::{SmbCredentials, SmbFs};
use remotefs_ssh::{ScpFs, SftpFs, SshConfigParseRule, SshOpts};
use remotefs_ssh::{ScpFs, SftpFs, SshAgentIdentity, SshConfigParseRule, SshOpts};
use remotefs_webdav::WebDAVFs;
use super::params::WebDAVProtocolParams;
@@ -167,6 +167,7 @@ impl Builder {
fn build_ssh_opts(params: GenericProtocolParams, config_client: &ConfigClient) -> SshOpts {
let mut opts = SshOpts::new(params.address.clone())
.key_storage(Box::new(Self::make_ssh_storage(config_client)))
.ssh_agent_identity(Some(SshAgentIdentity::All))
.port(params.port);
// get ssh config
let ssh_config = config_client