FTPS stands for "FTP over SSL/TLS". It is the existing FTP protocol,
made to run over an SSL/TLS connection; in this manner, it is very similar to
HTTPS (HTTP over SSL/TLS). In fact, that is where the name "FTPS" comes from.
The mod_tls
module for ProFTPD implements FTPS. Since FTPS is still FTP, any
FTPS sessions require multiple TCP connections: one TCP connection for the
FTP control channel, and separate TCP connections for each FTP data channel.
The need for these multiple connections is undesirable for many network
administrators, especially those that wish to restrict all protocols to a
single TCP connection which can be passed through firewalls/NAT/router
equipment. The network equipment, now, often inspects the application-level
data in FTP packets in order to dynamically open the necessary firewall rules
for the FTP data channels. However, FTPS encrypts those packets, and thus
the network firewall must resort to using a statically configured range of
ports, or not allow FTPS. There is a third solution: the CCC
FTP
command, which clears the FTP control channel of encryption, once the user has
authenticated. Unfortunately, support for the CCC
command is not
widespread among FTPS clients and servers; the mod_tls
module does
support the CCC
command.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit (http://www.openssl.org/).
This product includes cryptographic software written by Eric Young (eay@cryptsoft.com).
Be warned that some environment variables may have special meaning to
underlying libraries; care should be taken in the use of this directive.
In general, there is no need to use this directive unless specific public key
algorithms must be used (or avoided).
In general, there is no need to use this directive unless only one specific
cipher must be used.
In general, there is no need to use this directive unless only one specific
MAC algorithm must be used.
For comparison, the MAC algorithms used by OpenSSH (depending on the version)
by default are:
To enable an extension, preface the extension name with a '+' (plus) character;
to disable the extension, use a '-' (minus) character prefix. For example:
OpenSSH started using an OpenSSH-specific private key format in version 7.8.
ProFTPD did not support reading this OpenSSH-specific format until 1.3.7. Thus
if you need to use SSH hostkeys in the OpenSSH-specific private key format
with ProFTPD prior to 1.3.7, you will need to convert those private keys to
the more conventional PEM format that mod_sftp
supported. If
your SFTPHostKey
file starts with:
In general, there is no need to use this directive unless specific host keys
algorithm must be used (or avoided).
These known weak public keys arose because of a vulnerability in the OpenSSL
packages distributed by Debian:
In general, there is no need to use this directive unless only one specific
key exchange algorithm must be used.
A malicious client might try to abuse the server's resources by opening
an large number of SSH2 channels and then not using them. Most well-behaved
SSH2 clients only ever open one channel.
AllowInsecureLogin
By default, mod_sftp
will not allow password or
keyboard-interactive authentication if either the 'none' cipher
or MAC/digest is selected. (These must be explicitly allowed via
SFTPCiphers
and SFTPDigests
as well.) However,
some sites may deliberately wish to allow such logins, as for e.g.
performance testing. To allow such logins/sessions, then, use this option.
Note that this option first appeared in
proftpd-1.3.5
.
AllowWeakDH
The mod_sftp
will not use Diffie-Hellman groups of less
than 2048 bits, due to weaknesses
that can downgrade the security of an SSH session. If for any reason
your SFTP/SCP clients require smaller Diffie-Hellman groups, then
use this option.
Note that this option first appeared in
proftpd-1.3.6rc1
.
FIDOTouchRequired
When a FIDO security key is used for authentication, mod_sftp
will require that the signature prove user presence, usually via touching
the authenticator. A security key which does not prove user presence
will be rejected. Note that this option only applies to the FIDO
authenticator algorithms "ecdsa-sk" and "ed25519-sk".
However, the SFTPAuthorizedHostKeys
/
SFTPAuthorizedUserKeys
entries for such FIDO keys
can indicate that proof of user presence is not required
for a given key. There are cases where this is useful.
This option should be used by site administrators who always want to
require proof of user presence for FIDO keys, regardless of
any per-key overrides configured elsewhere.
Note that this option first appeared in
proftpd-1.3.9rc1
.
FIDOVerifyRequired
When a FIDO security key is used for authentication, mod_sftp
does not require that the signature prove user verification,
such as via PIN or biometrics. Use this option to require such
user verification for all security keys; a security key which does not
prove user verification will be rejected. Note that this option only
applies to the FIDO authenticator algorithms "ecdsa-sk" and "ed25519-sk".
Note that this option first appeared in
proftpd-1.3.9rc1
.
IgnoreFIFOs
By default, mod_sftp
allows uploading and downloading of FIFOs,
just as if they were regular files. However, in some cases this can lead
to "hangs" on the SFTP/SCP client end, especially when the FIFO
reader/writer processes are not running at the time. Thus to tell
mod_sftp
to ignore/reject requests to read from/write to FIFOs,
for both SFTP and SCP, use this option.
Note that this option first appeared in
proftpd-1.3.6rc3
.
IgnoreSCPUploadPerms
When an SCP client uploads a file, the desired permissions on the file
are sent to the server as part of the upload. (This is different from
FTP, which does not include the file permissions in an upload.)
If you need more FTP-like functionality for any reason and wish to
have mod_sftp
silently ignore any permissions sent by the
SCP client, use this option.
IgnoreSCPUploadTimes
Use this option to have mod_sftp
silently ignore any
timestamps sent by SCP clients as part of the upload.
Note that this option first appeared in
proftpd-1.3.5rc4
.
IgnoreSFTPSetExtendedAttributes
Use this option to have mod_sftp
silently ignore any
extended attributes sent by SFTP clients via the SETSTAT
or
FSETSTAT
SFTP requests.
Note that this option first appeared in
proftpd-1.3.6rc3
.
IgnoreSFTPSetOwners
Use this option to have mod_sftp
silently ignore any
ownership changes sent by SFTP clients via the SETSTAT
or
FSETSTAT
SFTP requests; these are equivalent to
an FTP SITE CHGRP
command.
Note that this option first appeared in
proftpd-1.3.5rc1
.
IgnoreSFTPSetPerms
Use this option to have mod_sftp
silently ignore any
permissions sent by SFTP clients via the SETSTAT
or
FSETSTAT
SFTP requests; these are equivalent to
an FTP SITE CHMOD
command.
Note that this option first appeared in
proftpd-1.3.4rc2
.
IgnoreSFTPSetTimes
Use this option to have mod_sftp
silently ignore any
timestamps sent by SFTP clients via the SETSTAT
or
FSETSTAT
SFTP requests; these are equivalent to
an FTP SITE UTIMES
command.
Note that this option first appeared in
proftpd-1.3.4rc4
.
IgnoreSFTPUploadExtendedAttributes
When an SFTP client uploads a file or creates a directory, the desired
extended attributes ("xattrs") on the path are sent to the server as part
of the upload. (This is different from FTP, which does not include
the file attributes in an upload.) If you need more FTP-like functionality
for any reason and wish to have mod_sftp
silently ignore any
extended attributes sent by the SFTP client, use this option.
Note that this option first appeared in
proftpd-1.3.6rc3
.
IgnoreSFTPUploadPerms
When an SFTP client uploads a file or creates a directory, the desired
permissions on the path are sent to the server as part of the upload.
(This is different from FTP, which does not include the file
permissions in an upload.) If you need more FTP-like functionality for any
reason and wish to have mod_sftp
silently ignore any
permissions sent by the SFTP client, use this option.
IncludeSFTPTimes
Some SFTP clients (e.g. the Rebex SFTP library) do not implement
SFTP protocol versions 4+ well, and do not request the
access/modify time attributes but expect/assume that those
time attributes will be present in the STAT
responses.
Use this option to tell mod_sftp
to always include the
access and modify time attributes in STAT
responses for
clients using SFTP protocol version 4 and higher.
Note that this option first appeared in
proftpd-1.3.7rc1
.
InsecureHostKeyPerms
When this option is used, mod_sftp
will ignore insecure
permissions (i.e. group- or world-readable) on
SFTPHostKey
files. This option should appear before
any SFTPHostKey
directives in the configuration, as hostkey
permissions are checked at configuration parse time.
Note that this option first appeared in
proftpd-1.3.6rc1
.
MatchKeySubject
When this option is used, if public key authentication is used, the
mod_sftp
module will check if the public key has a "Subject"
header. If so, that the value of that header must match the
name of the authenticating user/host.
Note that this option first appeared in
proftpd-1.3.4rc1
.
NoExtensionNegotiation
By default, mod_sftp
will offer/support the SSH extension
negotiation, defined by
RFC 8308. Use this
option to disable support for extension negotiations.
Note that this option first appeared in
proftpd-1.3.7rc4
.
NoHostkeyRotation
By default, mod_sftp
will offer/support the OpenSSH
hostkey rotation extensions, "hostkeys-00@openssh.com" and
"hostkeys-prove-00@openssh.com". Use this option to disable support for
these custom OpenSSH extensions.
Note that this option first appeared in
proftpd-1.3.8rc3
.
NoStrictKex
By default, mod_sftp
will honor/support the OpenSSH
"strict KEX" mode extension, "kex-strict-c-v00@openssh.com" and
"kex-strict-s-v00@openssh.com". Use this option to disable support for
these custom OpenSSH extensions.
Note that this option first appeared in
proftpd-1.3.9rc2
.
OldProtocolCompat
Older clients identity their protocol versions as "1.99", rather than as
"2.0". By default, mod_sftp
will refuse to handle connections
from such clients. To enable compatibility with these clients (which
tend to be derived from ssh.com/Tectia code), use this option.
Note that this option automatically enables the
PessimisticKexinit
SFTPOption as well.
Note that this option first appeared in
proftpd-1.3.4rc1
.
PessimisticKexinit
As described here, the mod_sftp
module tries to reduce the connection latency by optimistically sending
the KEXINIT
key exchange message. However, some SSH clients
cannot handle this behavior. Use this option to disable the optimistic
sending of the KEXINIT
message.
Note that this option first appeared in
proftpd-1.3.4rc1
.
The intent is that this external program can perform any security checks
necessary, to make sure that the system is not compromised by an attacker,
and only when these checks pass successfully will the passphrase be provided.
These security checks, and the way the passphrase is determined, can be as
complex as you like.
However, administrators wishing to use different rekey intervals or rekey
byte limits can use the optional interval (in seconds) and
bytes (in MB) parameters, e.g.:
Finally, the paranoid administrator may wish to set a timeout, in seconds,
in which a client must complete a session rekeying, otherwise the
client will be disconnected. This would look like:
First, the familiar territory. The following shows the
<Limit>
sections for FTP commands (just as for normal FTP
sessions) which are honored by mod_sftp
:
Command Class |
SSH, SFTP Requests |
ALL |
All requests except the EXIT pseudo-command (default) |
NONE |
No requests |
AUTH |
Authentication requests: USERAUTH_REQUEST |
INFO |
Informational commands: EXT_INFO
(SSH extension negotiation), REALPATH |
DIRS |
Directory commands: MKDIR , OPENDIR ,
READDIR , REALPATH , RMDIR |
READ |
File reading: CLOSE , FSTAT ,
LSTAT , OPEN , READ ,
READLINK , STAT |
WRITE |
File/directory writing or creation: CLOSE ,
FSETSTAT , LINK , LOCK ,
MKDIR , OPEN , REMOVE ,
RENAME , RMDIR , SETSTAT ,
SYMLINK , WRITE , UNLOCK |
MISC |
Miscellaneous commands: EXTENDED , FSYNC ,
HARDLINK , HOMEDIR , INIT ,
RENAME , SERVICE_REQUEST |
SEC |
SSH security requests: DH_GEX_INIT ,
DH_GEX_REQUEST , DH_INIT , ECDH_INIT ,
KEXINIT , KEXRSA_SECRET ,
NEWKEYS |
SSH |
SSH protocol requests: CHANNEL_CLOSE ,
CHANNEL_EOF , CHANNEL_OPEN ,
CHANNEL_REQUEST , CHANNEL_WINDOW_ADJUST ,
DH_GEX_INIT , DH_GEX_REQUEST ,
DH_INIT , ECDH_INIT , EXT_INFO ,
KEXINIT , KEXRSA_SECRET , NEWKEYS ,
SERVICE_REQUEST , USERAUTH_REQUEST |
SFTP |
SFTP protocol requests: CLOSE , EXTENDED ,
FSETSTAT , FSTAT , FSYNC ,
HARDLINK , HOMEDIR , INIT ,
LINK , LOCK , LSTAT ,
MKDIR , OPEN , OPENDIR ,
READ , READDIR , READLINK ,
REALPATH , REMOVE , RENAME ,
RMDIR , SETSTAT , STAT ,
SYMLINK , WRITE , UNLOCK |
EXIT |
Logs the configured LogFormat at session exit.
NOTE: EXIT is not part of the
ALL command class, in order to preserve
backward-compatible ALL behavior. |
In order for FIPS mode to be effective, OpenSSL must be told to run in FIPS
mode from the very beginning. The mod_sftp
module initializes the
OpenSSL library when the mod_sftp
module is loaded, before the
proftpd.conf
file is parsed. Thus the requesting of FIPS mode
cannot be done via a setting in proftpd.conf
. (Annoying,
I know.)