[erlang-questions] how: ssh_sftpd/ssh_sftp question

Michael Regen <>
Thu Nov 22 04:43:35 CET 2007


On Nov 21, 2007 6:05 PM, Mateusz Berezecki <> wrote:
> Hello list readers,
>
>
> I have a problem with ssh_sftpd/ssh_sftp pair.
> The following code does not work as expected...
>
>
> 1> crypto:start().
> ok
> 2> ssh:start().
> ok
> 3> ssh_sftpd:listen(1234).
> {ok,<0.46.0>}
> 4> ssh_sftp:connect("127.0.0.1", 1234, []).
> {error,{error,{error,closed}}}
>
> =ERROR REPORT==== 21-Nov-2007::18:04:27 ===
> ** Generic server <0.54.0> terminating
> ** Last message in was {'EXIT',<0.47.0>,{error,enoent}}
> ** When Server state == {state,server,<0.47.0>,19,[],
>                                 [{<0.56.0>,#Ref<0.0.0.127>}],
>                                 0,[],[],undefined}
> ** Reason for termination ==
> ** {error,enoent}
> 5>
>
>
> Can somebody explain to me how to properly establish a working
> connection ?

I never tried with ssh_sftpd only with ssh_sshd. But sftpd will need
access to certificate files as sshd needs them and should work very
similar to sshd. Therefore the following post might bring you a bit
closer to a solution:

http://forum.trapexit.org/mailinglists/viewtopic.php?t=10439

In addition you will probably need to set the cwd option.

Cheers,
Michael



More information about the erlang-questions mailing list