Start implementing SFTP

This commit is contained in:
nora 2024-08-30 22:25:09 +02:00
parent a9e2edc572
commit 2ad87d3a14
11 changed files with 549 additions and 32 deletions

View file

@ -376,7 +376,10 @@ impl SessionState {
if let Some(writer) = &mut self.writer {
writer.shutdown().await?;
}
// TODO: somehow this isn't enough to close an SFTP connection....
self.writer = None;
self.reader = None;
self.reader_ext = None;
}
ChannelUpdateKind::Open(_)
| ChannelUpdateKind::Closed
@ -409,7 +412,11 @@ impl SessionState {
Ok(())
}
async fn shell(&mut self, shell_command: Option<String>, subsystem: Option<String>) -> Result<()> {
async fn shell(
&mut self,
shell_command: Option<String>,
subsystem: Option<String>,
) -> Result<()> {
let mut fds = self
.rpc_client
.shell(