1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
.TH ssh_sftpd 3 "ssh 0.9.9.6" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
ssh_sftpd \- SSH FTP server\&.
.SH DESCRIPTION
.LP
This module implements an SFTP server\&.
.SH EXPORTS
.LP
.B
listen(Port) -> {ok, Pid}|{error, Error}
.br
.B
listen(Port, Options) -> {ok, Pid}|{error, Error}
.br
.B
listen(Addr, Port, Options) -> {ok, Pid}|{error, Error}
.br
.RS
.TP
Types
Port = integer()
.br
Addr = string()
.br
Options = [{Option, Value}]
.br
.RE
.RS
.LP
Starts an SFTP server on the given port\&. The server listens for connection of an SFTP client\&.
.LP
Options are:
.RS 2
.TP 4
.B
\fI{cwd, String}\fR:
Sets the initial current working directory for the server\&.
.TP 4
.B
\fI{file_handler, CallbackModule}\fR:
Determines which module to call for communicating with the file server\&. Default value is ssh_sftpd_file that uses the file and filelib API:s to access the standard OTP file server\&. This option may be used to plug in the use of other file servers\&.
.TP 4
.B
\fI{root, String}\fR:
Sets the sftp root directory\&. The user will then not be able to see any files above this root\&. If for instance the root is set to \fI/tmp\fR the user will see this directory as \fI/\fR and if the user does cd \fI/etc\fR the user will end up in \fI/tmp/etc\fR\&.
.RE
.LP
For more options, see \fIssh_cm:listen\fR\&.
.RE
|