Pure-Rust asynchronous SSH library, both client and server

#16 cannot close a channel using a thrussh::server::Handle

Closed on January 19, 2021
Treeki on January 12, 2021

I’ve used thrussh::server to implement a basic server that responds to PTY requests. I’m able to send data to clients from outside the handler by calling Handle::data, but it doesn’t seem like I can cleanly terminate the session without the ability to close the channel.

I’m wondering if this is something that was overlooked, since Handle implements other methods like eof and exit_status_request.

I’ve tried calling both of these, but the OpenSSH client will only end the session once the server has closed the channel. Currently I’m doing this on the first piece of data that gets received, but it would be nicer if I could just send a request via a Handle method.

pmeunier added a change on January 19, 2021
YSLHJU3IKZNAYQJ6JTN2VN3KRXFO3OW4N2C3L2DAYNSJVYOI5OPQC
main
pmeunier on January 19, 2021

Hi! Thanks for this request. Indeed, while this was implemented for the Session type, it wasn’t for handlers. I’ve just pushed a patch to fix that.

Feel free to ask any other question!

pmeunier closed this discussion on January 19, 2021
pmeunier on January 19, 2021

I have republished 0.32.5 with this feature.