1 .\" $OpenBSD: sftp-server.8,v 1.25 2013/10/14 14:18:56 jmc Exp $
4 .\" Copyright (c) 2000 Markus Friedl. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .Nd SFTP server subsystem
36 .Op Fl d Ar start_directory
37 .Op Fl f Ar log_facility
39 .Op Fl P Ar blacklisted_requests
40 .Op Fl p Ar whitelisted_requests
44 .Fl Q Ar protocol_feature
47 is a program that speaks the server side of SFTP protocol
48 to stdout and expects client requests from stdin.
50 is not intended to be called directly, but from
58 should be specified in the
67 .It Fl d Ar start_directory
68 specifies an alternate starting directory for users.
69 The pathname may contain the following tokens that are expanded at runtime:
70 %% is replaced by a literal '%',
71 %h is replaced by the home directory of the user being authenticated,
72 and %u is replaced by the username of that user.
73 The default is to use the user's home directory.
74 This option is useful in conjunction with the
81 to print logging information to stderr instead of syslog for debugging.
82 .It Fl f Ar log_facility
83 Specifies the facility code that is used when logging messages from
85 The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
86 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
93 Specifies which messages will be logged by
95 The possible values are:
96 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
97 INFO and VERBOSE log transactions that
99 performs on behalf of the client.
100 DEBUG and DEBUG1 are equivalent.
101 DEBUG2 and DEBUG3 each specify higher levels of debugging output.
102 The default is ERROR.
103 .It Fl P Ar blacklisted_requests
104 Specify a comma-separated list of SFTP protocol requests that are banned by
107 will reply to any blacklisted request with a failure.
110 flag can be used to determine the supported request types.
111 If both a blacklist and a whitelist are specified, then the blacklist is
112 applied before the whitelist.
113 .It Fl p Ar whitelisted_requests
114 Specify a comma-separated list of SFTP protocol requests that are permitted
116 All request types that are not on the whitelist will be logged and replied
117 to with a failure message.
119 Care must be taken when using this feature to ensure that requests made
120 implicitly by SFTP clients are permitted.
121 .It Fl Q Ar protocol_feature
122 Query protocol features supported by
124 At present the only feature that may be queried is
126 which may be used for black or whitelisting (flags
132 Places this instance of
134 into a read-only mode.
135 Attempts to open files for writing, as well as other operations that change
136 the state of the filesystem, will be denied.
140 to be applied to newly-created files and directories, instead of the
146 must be able to access
150 in a chroot configuration therefore requires that
152 establish a logging socket inside the chroot directory.
161 .%T "SSH File Transfer Protocol"
162 .%N draft-ietf-secsh-filexfer-02.txt
164 .%O work in progress material
171 .An Markus Friedl Aq Mt markus@openbsd.org