[erlang-bugs] Error on running Erlang SSH server

Mario Santoro mario.santoro@REDACTED
Mon Jun 16 18:22:25 CEST 2014


Hi Tony,
you were right about the wrong tuple where I specified the system_dir.

Tried with the following:

>{ok, Sshd} = ssh:daemon(8988, [{auth_methods, "password"}, {user_passwords, [{"mario", "mariopasswd"}]}, {system_dir, "C:/Utility/Putty/ssh_daemon"} ]).
âZ{ok,<0.644.0>}

but at client connection:
>{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"}

I got the same error.

The host keys are installed in the specified paths.

Hi,
which ssh version are you running?

Hi Hans,
from the output of ssh:module_info()., I get:
¡­
{version,"4.9"},
{time,{2013,2,25,19,38,30}}
¡­


Thanks all so far for your help.

/Mario


From: Tony Rogvall [mailto:tony@REDACTED]
Sent: venerd¨¬ 13 giugno 2014 15:14
To: hans@REDACTED
Cc: Mario Santoro; erlang-bugs@REDACTED
Subject: Re: [erlang-bugs] Error on running Erlang SSH server


On 13 jun 2014, at 14:46, Hans Nilsson <hans@REDACTED<mailto:hans@REDACTED>> wrote:


Hi,
which ssh version are you running?
/Hans
On 2014-06-12 17:03, 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:
(node1@REDACTED)1> ssh:start().
ok
(node1@REDACTED)2> {ok, Sshd} = ssh:daemon(8988, [{auth_methods, "password"}, {user_passwords, [{"mario", "mariopasswd"},{system_dir, "C:/Utility/Putty/ssh_daemon"}]} ]).
{ok,<0.54.0>}

Could the problem be that {system_dir, "C:/Utility/Putty/ssh_daemon"}
is specified in the {user_passwords,..} list and not as a separate option. ?


/Tony


but on receiving a connection from the client:
(node2@REDACTED)1> ssh:start().
ok
(node2@REDACTED)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:
(node1@REDACTED)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 erlang-bugs@REDACTED<mailto:erlang-bugs@REDACTED>


This happens at each client connection attempt.
Could you please help me on this issue?

Thank you in advance for your help.

Regards,
/Mario

<Mail Attachment.gif>

MARIO SANTORO
CD Media & Application

Ericsson Telecomunicazioni SpA
SCM Region
Via Anagnina, 203
00118, Rome, ITALY
Phone +39 06 7258 8404
Fax +39 06 7258 4289
Mobile +39 335 699 5215
mario.santoro@REDACTED<mailto:mario.santoro@REDACTED>
www.ericsson.com<x-msg://3/www.ericsson.com>


<Mail Attachment.png><http://www.ericsson.com/>

This Communication is Confidential. We only send and receive email on the basis of the terms set out atwww.ericsson.com/email_disclaimer<http://www.ericsson.com/email_disclaimer>





_______________________________________________

erlang-bugs mailing list

erlang-bugs@REDACTED<mailto:erlang-bugs@REDACTED>

http://erlang.org/mailman/listinfo/erlang-bugs

_______________________________________________
erlang-bugs mailing list
erlang-bugs@REDACTED<mailto:erlang-bugs@REDACTED>
http://erlang.org/mailman/listinfo/erlang-bugs

"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140616/9ef959c6/attachment.htm>


More information about the erlang-bugs mailing list