<div dir="ltr"><br><div class="gmail_extra">Hi!<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Will have to look into this and see what we can do to improve the situation. I have created a ticket<br></div>
<div class="gmail_extra">to handle the issue. <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards Ingela Erlang/OTP Team - Ericsson AB<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-04-25 11:28 GMT+02:00 Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><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" target="_blank">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 style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular">undefined -></span><br style="font-family:SourceCodePro-Regular"><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">    </span><span style="font-family:SourceCodePro-Regular">    case proplists:get_value(user_dir, Opts) of</span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">      </span><span style="font-family:SourceCodePro-Regular">undefined -></span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">      </span><span style="font-family:SourceCodePro-Regular">    default_user_dir();</span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">      </span><span style="font-family:SourceCodePro-Regular">Dir -></span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">      </span><span style="font-family:SourceCodePro-Regular">    Dir</span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </span><span style="font-family:SourceCodePro-Regular">    end;</span><br style="font-family:SourceCodePro-Regular"><span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">       </span><span style="font-family:SourceCodePro-Regular">FUN -></span><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular;white-space:pre-wrap">   </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><span class="HOEnZb"><font color="#888888"><br style="font-family:SourceCodePro-Regular">
<span style="font-family:SourceCodePro-Regular">Dmitry</span></font></span></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div>