<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span style="font-family: SourceCodePro-Regular;">Hello,</span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">I’ve notice that Erlang SSH daemon do not expand the user_dir with the name of remote user, who tries to log-in. Thus a single instance of authorised_keys exist on the server for all users. Same time, there is undocumented user_dir_fun config option that takes a function which map remote user to its “home” folder.</span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">The question is where is the bug? </span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">At documentation: </span><a href="http://www.erlang.org/doc/man/ssh.html" style="font-family: SourceCodePro-Regular;">http://www.erlang.org/doc/man/ssh.html</a><span style="font-family: SourceCodePro-Regular;"> user_dir_fun is not defined </span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">At ssh_file.erl: </span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">— CLIP —</span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">ssh_dir({remoteuser, User}, Opts) -></span><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;"> case proplists:get_value(user_dir_fun, Opts) of</span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;">undefined -></span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;"> case proplists:get_value(user_dir, Opts) of</span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;">undefined -></span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;"> default_user_dir();</span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;">Dir -></span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;"> Dir</span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;"> end;</span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;">FUN -></span><br style="font-family: SourceCodePro-Regular;"><span class="Apple-tab-span" style="font-family: SourceCodePro-Regular; white-space: pre;"> </span><span style="font-family: SourceCodePro-Regular;"> FUN(User)</span><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;"> end;</span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">— CLIP — </span><br style="font-family: SourceCodePro-Regular;"><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">Best Regards, </span><br style="font-family: SourceCodePro-Regular;"><span style="font-family: SourceCodePro-Regular;">Dmitry</span></body></html>