pub struct SSHRunner {
pub host: String,
pub user: Option<String>,
pub jump_host: Option<String>,
pub jump_user: Option<String>,
pub ssh_port: Option<u16>,
pub ssh_key_path: Option<String>,
pub ssh_config_path: Option<String>,
pub timeout: u64,
pub connect_timeout: u64,
pub verbose: bool,
pub use_control_master: Cell<bool>,
}Fields§
§host: String§user: Option<String>§jump_host: Option<String>§jump_user: Option<String>§ssh_port: Option<u16>§ssh_key_path: Option<String>§ssh_config_path: Option<String>§timeout: u64§connect_timeout: u64§verbose: bool§use_control_master: Cell<bool>Dynamically disabled when a ControlMaster failure is detected at runtime.
Implementations§
Source§impl SSHRunner
impl SSHRunner
pub fn new(host: &str) -> Self
Sourcepub fn is_cm_failure(stderr: &str) -> bool
pub fn is_cm_failure(stderr: &str) -> bool
Detect ControlMaster failure patterns in SSH stderr output. These typically appear on Windows/WSL2 when the CM socket path contains non-ASCII characters or the named pipe cannot be created.
pub fn with_jump(self, jump: &str) -> Self
pub fn with_user(self, user: &str) -> Self
pub fn test_connection(&self, timeout: Option<u64>) -> Result<bool>
pub fn run_command( &self, command: &str, timeout: Option<u64>, ) -> Result<RemoteTaskResult>
pub fn upload(&self, local: &str, remote: &str) -> Result<()>
pub fn upload_text(&self, text: &str, remote: &str) -> Result<()>
pub fn download(&self, remote: &str, local: &str) -> Result<()>
pub fn detect_python(&self) -> Result<Option<String>>
pub fn detect_arch(&self) -> Result<String>
pub fn remote_target(&self) -> String
Sourcepub fn verify_cmd_hint(&self) -> String
pub fn verify_cmd_hint(&self) -> String
Build a minimal SSH command string for manual connectivity verification. Useful for error messages when the tunnel cannot be established.
Auto Trait Implementations§
impl !Freeze for SSHRunner
impl !RefUnwindSafe for SSHRunner
impl Send for SSHRunner
impl !Sync for SSHRunner
impl Unpin for SSHRunner
impl UnsafeUnpin for SSHRunner
impl UnwindSafe for SSHRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more