[erlang-questions] SSH daemon, raw mode for shell function

Ingela Andin <>
Fri Jan 8 12:02:23 CET 2016


Hi!

This does not seem to be documented, but looking at the code you should be
able to include gen_tcp/inet options in the ssh:daemon options list and
they will be pass on to gen_tcp/inet if not explicitly disallowed. Have not
tried the raw option.

Regards Ingela Erlang/OTP Team - Ericsson AB


2016-01-03 21:08 GMT+01:00 Zdenek Sejcek <>:

> Hi guys,
>
> I am trying to build application where users can remotely connect to using
> SSH. Following code snippet works perfectly fine:
>
> start() ->
>   ssh:daemon(1122,
>     [
>       {system_dir, "/tmp/ssh_daemon"},
>       {shell, fun dispatch/2 }, % {?MODULE, dispatch, []}
>       {pwdfun, fun passwordfn/2},
>       {parallel_login, true}
>     ]).
>
> What I need is to turn on raw mode, which simply means keys wont’t be
> interpretted on client side (e.g. shell command line), but everything will
> be send to server first. It enables applications like vi, emacs, mc to
> offer complex TUI. Some people suggested ncurses as solution, but I still
> don’t know how erlang implements ssh server under the hood so I can’t apply
> such a complicated solution right now.
>
> So my question is: how to turn on raw mode? Or please share some
> under-cover details that might help me to better understand how ssh daemon
> works.
>
> Thank you.
> Zdenek Sejcek
> _______________________________________________
> 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/20160108/10b0550b/attachment.html>


More information about the erlang-questions mailing list