<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<br><br>The ssh daemon will not function correctly (logging in fails) with only ssh_host_rsa_key and ssh_host_rsa_key.pub in system_dir. However, ssh_host_dsa_key and ssh_host_dsa_key.pub are sufficient by themselves for the ssh daemon to function correctly. This means that the ssh daemon does start if both keys exist but there seems to be no way to force the daemon to use the RSA keys.<br><br>Also, I have some code using the daemon in which two users connecting to the server (different logins), cause the server to close all open connections. (Ie, logging in as admin and root, and having admin type quit will close both connections). I wouldn't be surprised if this is because I am doing something wrong though:<br>-module(ssh_example).<br>-export([start/0, dispatch/0, dispatch_init/0, recv_loop/1]).<br><br>-include("ssh_example.hrl").<br><br>start() -><br> crypto:start(),<br> <a href="ssh:start()">ssh:start()</a>,<br> <a href="ssh:daemon(">ssh:daemon(</a>{0,0,0,0}, 1122, [{shell, {?MODULE, dispatch, []}},<br> {user_passwords, [{"admin", "admin"}, {"root", "admin"}]}, {system_dir, "/erlang_test"}]).<br><br>dispatch() -><br> spawn(?MODULE, dispatch_init, []).<br><br>dispatch_init() -><br> io:format("Hello user!\n"),<br> Rec = spawn_link(?MODULE, recv_loop, [self()]),<br> loop(Rec).<br><br>loop(Rec) -><br> receive<br> {Rec, Line} -><br> io:format("~s~s",[?FG_GREEN, Line])<br> end,<br> case Line of<br> "quit\n" -><br> io:format("Good bye!\n"),<br> exit(Rec, ok);<br> _ -><br> loop(Rec)<br> end.<br><br>recv_loop(Dispatcher) -><br> Prompt = "> ",<br> Line = io:get_line(?RESET ++ Prompt),<br> Dispatcher ! {self(), Line},<br> ?MODULE:recv_loop(Dispatcher).<br><br><br>Charles<br></body></html>