pub struct RusshSession<T>{ /* private fields */ }Available on crate feature
russh only.Expand description
russh session.
Trait Implementations§
Source§impl<T> SshSession for RusshSession<T>
impl<T> SshSession for RusshSession<T>
type Sftp = RusshSftp
Source§fn connect(opts: &SshOpts) -> RemoteResult<Self>
fn connect(opts: &SshOpts) -> RemoteResult<Self>
Connects to the SSH server and establishes a new
SshSessionSource§fn disconnect(&self) -> RemoteResult<()>
fn disconnect(&self) -> RemoteResult<()>
Disconnect from the server
Get the SSH server banner.
Source§fn authenticated(&self) -> RemoteResult<bool>
fn authenticated(&self) -> RemoteResult<bool>
Check if the session is authenticated.
Source§fn cmd<S>(&mut self, cmd: S) -> RemoteResult<(u32, String)>
fn cmd<S>(&mut self, cmd: S) -> RemoteResult<(u32, String)>
Executes a command on the SSH server and returns the exit code and the output.
Source§fn scp_recv(&self, path: &Path) -> RemoteResult<Box<dyn Read + Send>>
fn scp_recv(&self, path: &Path) -> RemoteResult<Box<dyn Read + Send>>
Receives a file over SCP. Read more
Source§fn scp_send(
&self,
remote_path: &Path,
mode: i32,
size: u64,
_times: Option<(u64, u64)>,
) -> RemoteResult<Box<dyn Write + Send>>
fn scp_send( &self, remote_path: &Path, mode: i32, size: u64, _times: Option<(u64, u64)>, ) -> RemoteResult<Box<dyn Write + Send>>
Send a file over SCP. Read more
Source§fn sftp(&self) -> RemoteResult<Self::Sftp>
fn sftp(&self) -> RemoteResult<Self::Sftp>
Returns a SFTP client
Auto Trait Implementations§
impl<T> Freeze for RusshSession<T>
impl<T> !RefUnwindSafe for RusshSession<T>
impl<T> Send for RusshSession<T>
impl<T> Sync for RusshSession<T>
impl<T> Unpin for RusshSession<T>
impl<T> UnsafeUnpin for RusshSession<T>
impl<T> !UnwindSafe for RusshSession<T>
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