[erlang-questions] Closing a ssh channel from client side with killing the connection
Fri Sep 11 12:09:41 CEST 2015
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 <>:
> 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
> 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 shows that either party can close
> the channel. So this perhaps could be added as a new public api
> in ssh_channel module.
> : https://www.ietf.org/rfc/rfc4254.txt
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions