[erlang-bugs] Error on running Erlang SSH server

Michael.K.Schmidt <>
Wed Jun 18 17:55:54 CEST 2014

Hi Mario,

I noticed that you had "Putty" in your dir path
("C:/Utility/Putty/ssh_daemon"). Is your private key a .ppk file? Putty on
Windows uses a different file format for its keys than what the Erlang ssh
library is expecting.  From  "PuTTY Key Generator", select "Conversions" ->
"Export OpenSSH key" and save it as

Hope that helps,

Michael Schmidt  |   APC by Schneider Electric   |  End User Business Group
- IT Business  |   United States  |   Firmware Engineer
Phone: +636-300-2300 ext. 11480  |   Fax: +636-300-2333  |   Mobile:
Email:   |   Site:
www.schneider-electric.com  |   Address: 801 Corporate Centre Drive,
O'Fallon, MO 63368

*** Please consider the environment before printing this e-mail

             Mario Santoro                                                 
             icsson.com>                                                To 
             Sent by:                  Tony Rogvall <>,     
             erlang-bugs-bounc         ""                   
             06/16/2014 11:22          <>            
             AM                                                    Subject 
                                       Re: [erlang-bugs] Error on running  
                                       Erlang SSH server                   

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"} ]).

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

I got the same error.

The host keys are installed in the specified paths.

which ssh version are you running?

Hi Hans,
from the output of ssh:module_info()., I get:

Thanks all so far for your help.


From: Tony Rogvall [mailto:]
Sent: venerdì 13 giugno 2014 15:14
Cc: Mario Santoro; 
Subject: Re: [erlang-bugs] Error on running Erlang SSH server

On 13 jun 2014, at 14:46, Hans Nilsson <> wrote:

which ssh version are you running?
On 2014-06-12 17:03, Mario Santoro wrote:
      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”
      while the user public_key is into “C:/Utility/Putty/public_key”
      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().
      ()2> {ok, Sshd} = ssh:daemon(8988,
      [{auth_methods, "password"}, {user_passwords, [{"mario",
      "mariopasswd"},{system_dir, "C:/Utility/Putty/ssh_daemon"}]} ]).

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. ?


            but on receiving a connection from the client:
            ()1> ssh:start().
            ()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} ],
            ** exception error: no match of right hand side value
            {error,"Internal error"}

            the SSH server application is crashing with the following
            =ERROR REPORT==== 29-May-2014::17:44:58 ===
            Erlang ssh connection handler failed with reason:
            , Stacktace: [{ssh_file,identity_pass_phrase,






            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.


            <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

            <Mail Attachment.png>

            This Communication is Confidential. We only send and receive
            email on the basis of the terms set out at

            erlang-bugs mailing list

      erlang-bugs mailing list

"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"

This email has been scanned by the Symantec Email Security.cloud service.
erlang-bugs mailing list


More information about the erlang-bugs mailing list