diff --git a/src/client.rs b/src/client.rs index 6da6cbf..6a81434 100644 --- a/src/client.rs +++ b/src/client.rs @@ -261,6 +261,13 @@ impl Client { .map_err(crate::Error::SshError) } + /// Upload a file with sftp to the remote server. + /// + /// `src_file_path` is the path to the file on the local machine. + /// `dest_file_path` is the path to the file on the remote machine. + /// Some sshd_config does not enable sftp by default, so make sure it is enabled. + /// A config line like a `Subsystem sftp internal-sftp` or + /// `Subsystem sftp /usr/lib/openssh/sftp-server` is needed in the sshd_config in remote machine. pub async fn upload_file( &self, src_file_path: &str,