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