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

Zdenek Sejcek zdenek@REDACTED
Sun Jan 3 21:08:08 CET 2016


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


More information about the erlang-questions mailing list