[erlang-questions] Closing a ssh channel from client side with killing the connection

Ingela Andin <>
Fri Sep 11 12:09:41 CEST 2015


Hi!

Just terminate your channel process and the channel behavior will take
care of closing the channel correctly.

Regards Ingela Erlang/OTP team - Ericsson AB


2015-09-07 15:14 GMT+02:00 Vipin Nair <>:

> Hello,
>
> I am calling ssh_connection:exec/4 from a process implementing
> the ssh_channel behaviour. I want to ensure that all commands
> exit within some time limit. Say, someone runs a tail -f
> /var/log/syslog, I want to ensure that this is not run beyond X
> seconds.
>
> My idea was to close the channel after the timeout, but I am not
> sure how to do this. There may be multiple channel established
> over the same connection so I cannot kill the connection. How
> should I do this?
>
> A quick glance at the RFC[1] shows that either party can close
> the channel. So this perhaps could be added as a new public api
> in ssh_channel module.
>
> [1]: https://www.ietf.org/rfc/rfc4254.txt
>
>
> --
> Regards,
> Vipin
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150911/91b1bd97/attachment.html>


More information about the erlang-questions mailing list