[erlang-questions] scp subsystem
Stefan Jahn
stefan@REDACTED
Thu Mar 21 10:22:17 CET 2013
Hello,
thank you for your email.
The ssh_userreg:lookup_user function returns me {ok, User} which
is exactly what I needed. I called it with the connection manager
argument passed to the ssh_channel_up message. I guess it will
work for any other message as well.
I have not yet tested the sftp subsystem in parallel, but the
shell interface does not seem to be available any longer. Probably
I need to take care of something in the ssh_cli ssh_channel
implementation to be the shell still available?
So far implementation of sink mode in the server has been done.
If I do not want to use the scp command, but implement my own
file operations, do I need to parse the exec command in order to
e.g. find out about source/sink mode, correct?
Thank you in advance,
Stefan.
On Wed, March 20, 2013 9:20 am, Ingela Andin wrote:
> Hi!
>
> 2013/3/20, Stefan Jahn <stefan@REDACTED>:
>> Hello,
>>
>> after some experiments I ended up with a working file transfer from
>> standard scp command to my erlang scp daemon.
>>
>> Thank you for the hint with ssh_cli option.
>>
>> Now, I have a question about the connection / channel within the
>> ssh_channel messages (handle_ssh_msg). How do I get the user login
>> name from this scope?
>
> Well the cli option is the least mature part of the ssh application.
> The standard cli
> uses ssh_userreg:lookup_user/1 (ssh_cli.erl) which is not a a
> documented function at the moment. We are interested in your
> experiences for future improvment work.
>
>>>> Can I add e.g. {subsystems, [ssh_sftp:subsystem_spec([])]}} having
>>>> the sftp server in parallel?
>
> Yes you can have subsystems in parallell to a cli-implementation (cli
> option) or shell adaptation (shell option).
More information about the erlang-questions
mailing list