[erlang-bugs] Error on running Erlang SSH server

Ingela Anderton Andin <>
Mon Jun 16 09:42:07 CEST 2014


Hi!

On 06/15/2014 07:56 PM, Arif wrote:
> I have tried to replicate the problem and it is as Tony suggested:
> system_dir in the list of user_passwords ensures system_dir is not set.
> There are either no host keys in the default directory as Daniel's reply
> suggests or if they are, they are not readable.
> The bug, if any, would be the somewhat misleading error message with a
> request to report it to this mailing list.


Yes we also have found that message to be misleading a few times,
it has been changed in the latest version of ssh.

Regards Ingela Erlang/OTP team - Ericsson AB






> Regards
> Arif
>
> On 06/14/2014 12:00 PM,  wrote:
>> Date: Fri, 13 Jun 2014 09:08:05 -0500
>> From: Daniel Goertzen <>
>> To: Mario Santoro <>
>> Cc: "" <>
>> Subject: Re: [erlang-bugs] Error on running Erlang SSH server
>> Message-ID:
>>     <CAJCf5RydyfGYF=zimifPLFUjjDpd0_YrPM856BQ7C=>
>> Content-Type: text/plain; charset="utf-8"
>>
>>
>> On Thu, Jun 12, 2014 at 10:03 AM, Mario Santoro
>> <>
>> wrote:
>>
>>>   Hi,
>>>
>>> I?m trying to run an SSH server in Erlang and test a <user/password>
>>> connection over SSH.
>>>
>>> I?ve generated an RSA keys pair (with NO passphrase) for the SSH system
>>> and put the private key into ?C:/Utility/Putty/ssh_daemon? directory,
>>>
>>> while the user public_key is into ?C:/Utility/Putty/public_key?
>>> directory.
>>>
>>> I?m running both the server and the client on the same PC, into two
>>> different Erlang nodes.
>>>
>>>
>>>
>>> The SSH server starts fine:
>>>
>>> *(**)1> ssh:start().*
>>>
>>> *ok*
>>>
>>> *()2> {ok, Sshd} = ssh:daemon(8988, [{auth_methods,
>>> "password"}, {user_passwords, [{"mario", "mariopasswd"}, {system_dir,
>>> "C:/Utility/Putty/ssh_daemon"}]} ]).*
>>>
>>> *{ok,<0.54.0>}*
>>>
>>>
>>>
>>>
>>>
>>> but on receiving a connection from the client:
>>>
>>> *()1> ssh:start().*
>>>
>>> *ok*
>>>
>>> *()2> {ok, ConnectionRef} =
>>> ssh:connect("E7E4115BF83167", 8988, [{user, "mario"}, {password,
>>> "mariopasswd"}, {user_dir, "C:/Utility/Putty/public_key"},
>>> {silently_accept_hosts, true}, {user_interaction, false} ], 5000).*
>>>
>>> *** exception error: no match of right hand side value {error,"Internal
>>> error"}*
>>>
>>>
>>>
>>>
>>>
>>> the SSH server application is crashing with the following error:
>>>
>>> *()3> *
>>>
>>> *=ERROR REPORT==== 29-May-2014::17:44:58 ===*
>>>
>>> *Erlang ssh connection handler failed with reason: function_clause *
>>>
>>> *, Stacktace: [{ssh_file,identity_pass_phrase,*
>>>
>>> *                        [undefined],*
>>>
>>> *                        [{file,"ssh_file.erl"},{line,222}]},*
>>>
>>> *              {ssh_file,host_key,2,[{file,"ssh_file.erl"},{line,53}]},*
>>>
>>> *              {ssh_transport,get_host_key,1,*
>>>
>>> *                             [{file,"ssh_transport.erl"},{line,412}]},*
>>>
>>> *              {ssh_transport,handle_kexdh_init,2,*
>>>
>>> *                             [{file,"ssh_transport.erl"},{line,314}]},*
>>>
>>> *              {ssh_connection_handler,key_exchange,2,*
>>>
>>> *
>>>                                  [{file,"ssh_connection_handler.erl"},*
>>>
>>> *                                       {line,201}]},*
>>>
>>> *
>>> {gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,494}]},*
>>>
>>> *
>>> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}] *
>>>
>>> *please report this to  <>*
>>>
>>>
>>>
>>>
>>>
>>> This happens at each client connection attempt.
>>>
>>> Could you please help me on this issue?
>>>
>>>
>>>
>>> Thank you in advance for your help.
>>>
>>>
>>>
>>> Regards,
>>>
>>> /Mario
>>>
>>>
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs



More information about the erlang-bugs mailing list