Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk10 min

How to Configure ProFTPD to Use SFTP Instead of FTP

A practical ProFTPD guide to running SFTP through mod_sftp, choosing ports, configuring host keys and authorized keys, testing clients, and making the server SFTP-only.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure ProFTPD’s mod_sftp in a separate virtual host, give it an SSH/SFTP port (normally 22), define the required host keys, and test an SFTP login before removing FTP. SFTP is SSH2-based and is not the same protocol as FTPS, which remains FTP protected by TLS.

What you are changing

ProFTPD does not turn ordinary FTP into SFTP by adding an SSL certificate. SFTP is a subsystem of SSH2, provided in ProFTPD by the mod_sftp module. FTPS is a different arrangement: it keeps FTP’s control and data channels and protects them with SSL/TLS.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Characteristic SFTP with mod_sftp FTPS
Protocol stack SSH2 FTP plus SSL/TLS
Connection model One SSH transport carrying file operations FTP control and data channels, potentially requiring separate data connections
Typical port arrangement A single SSH/SFTP port, commonly 22 FTP control port plus a configured passive or active data range
Authentication SSH-style passwords and public keys, as permitted by your ProFTPD authentication setup FTP authentication protected by TLS
Client compatibility Requires an SFTP-capable SSH client Requires an FTP client with the appropriate FTPS mode

Because SSH2 and FTP listen differently, the normal design is a dedicated SFTP <VirtualHost> with a different Port from the existing FTP listener. The same address can host both services when their ports do not overlap.

Check the prerequisites before editing

  • Verify that the installed ProFTPD build contains mod_sftp and that the module is loaded. If the module is absent, directives such as SFTPEngine and SFTPHostKey will not be recognized.
  • Identify the address on which ProFTPD should listen. The examples below use the documentation address 203.0.113.10; replace it with the server address assigned to your host.
  • Choose a free SSH/SFTP port. Use 22 only when another SSH service is not already bound there. If OpenSSH or another daemon owns port 22, select a documented alternate port and open that port in your firewall.
  • Locate the OpenSSH host-key files that the daemon can read. The example uses RSA, ECDSA, and Ed25519 keys under /etc/ssh/.
  • Decide whether FTP will remain available during a transition or whether the final state must be SFTP-only. Keeping both listeners temporarily gives you a way to test SFTP before removing the old service.

Configure an SFTP virtual host alongside FTP

Place the SFTP settings in the configuration file or included file used by your ProFTPD installation. Keep the existing FTP listener while testing. This layout gives FTP port 21 and SFTP port 22 on the same address:

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
# Existing FTP listener
DefaultAddress 203.0.113.10
Port 21

<IfModule mod_sftp.c>
  <VirtualHost 203.0.113.10>
    Port 22
    SFTPEngine on
    SFTPLog /etc/proftpd/sftp/sftp.log

    # Reuse the host keys used by OpenSSH
    SFTPHostKey /etc/ssh/ssh_host_rsa_key
    SFTPHostKey /etc/ssh/ssh_host_ecdsa_key
    SFTPHostKey /etc/ssh/ssh_host_ed25519_key

    # Per-user public-key authorization example
    SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys
  </VirtualHost>
</IfModule>

Why the virtual host needs its own port

SSH2/SFTP has a different wire protocol from FTP. A listener accepting FTP cannot also interpret an incoming SSH handshake as SFTP. Assigning separate Port directives lets ProFTPD route each connection to the right protocol. If the address has multiple virtual hosts, each one must use a non-conflicting port.

What each directive does

  • <IfModule mod_sftp.c> makes the block conditional on the module being available. It prevents SFTP directives from being applied when the module is not loaded, but it does not install or load the module for you.
  • Port 22 selects the SFTP listener in this example. Change it when port 22 is occupied or when your network policy requires another port.
  • SFTPEngine on enables the SFTP engine for that virtual host. Without it, the virtual host does not provide SFTP even if the module is present.
  • SFTPLog assigns a dedicated log path. The directory must already exist and be writable in the way required by the ProFTPD daemon.
  • Each SFTPHostKey identifies a private host key that ProFTPD presents to SFTP clients. At least one host key is required; listing the available OpenSSH keys lets clients negotiate a key type they support.
  • SFTPAuthorizedUserKeys tells mod_sftp where to find users’ authorized public keys. The file:~/.sftp/authorized_keys form resolves a per-user file below each user’s home directory.

Use the same host keys as OpenSSH

SFTPHostKey is required. The ProFTPD documentation recommends reusing the host-key files already used by OpenSSH. Doing so preserves the server’s SSH identity across services. If ProFTPD presents a different key from OpenSSH for the same host, clients can warn that the host identity has changed, forcing administrators to investigate or replace a known-host entry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check that every configured private key exists, is the intended key for that server, and is readable by the account under which ProFTPD runs. Do not copy private keys into user home directories or expose them through an authorization file. Keep the private-key permissions and ownership consistent with the security policy used for the rest of the SSH service.

If you have only one supported host-key type, configure that key rather than leaving a path to a nonexistent file. After changing a host key, expect clients to perform host-identity checks again; a changed fingerprint should be treated as a security event until you have verified the replacement.

Configure user authentication

Password authentication

SFTP can use the password authentication mechanisms already configured for ProFTPD, subject to the authentication modules and login rules in your installation. Enabling SFTPEngine does not automatically create users or bypass existing account restrictions. Test with a normal account that is permitted to log in, and check the SFTP log if the password is rejected.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Public-key authentication with SFTPAuthorizedUserKeys

For per-user keys, create the authorization file represented by the configured path under the user’s home directory. The file must contain the public key format expected by mod_sftp and must be readable according to the daemon’s access rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When importing an OpenSSH public key for this directive, convert it to RFC4716 format with:

ssh-keygen -e -f ~/.ssh/id_rsa.pub -m RFC4716

Place the converted key in the configured authorization file. The conversion matters because an OpenSSH public-key line and an RFC4716 public-key block are different representations. If you paste an unconverted key and authentication fails, inspect the format before changing account permissions or passwords.

Repeat the setup for each account that should use key authentication. Keep an out-of-band administrative login available while testing so a malformed authorization file cannot lock you out of the server.

Set up logging and verify file access

Create the directory used by SFTPLog before starting the service, and confirm that the ProFTPD daemon can create or append to the log file. A missing directory or an unwritable path can make a working SFTP listener appear broken because connection details are not recorded where you expect.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Use the SFTP log together with the main ProFTPD log when diagnosing a failure. Look for the sequence of connection, host-key negotiation, authentication method, authorization result, and file-operation errors. Avoid placing private keys or passwords in diagnostic output.

Apply the configuration safely

  1. Save a copy of the currently working ProFTPD configuration and note every included file. A setting in an included file can override or supplement the block you just edited.
  2. Confirm that mod_sftp is installed and loaded. If the module is not loaded, stop and resolve that packaging or module-loading problem before troubleshooting directives.
  3. Check that the selected SFTP port is free and that the firewall permits connections to it. If port 22 belongs to OpenSSH, use another port rather than attempting to bind both daemons to the same socket.
  4. Add the SFTP virtual host, required host keys, logging path, and authentication settings. Keep the existing FTP listener in place during this first test.
  5. Use the configuration-validation mechanism supplied by your operating system and ProFTPD package before reloading or restarting the daemon. Correct syntax errors, unknown directives, missing files, and duplicate listeners before continuing.
  6. Reload or restart ProFTPD using the service-management method for your system, then inspect the service status and logs for startup errors.
  7. Connect with an SFTP client to the selected address and port. For a command-line client, the port-specific form is sftp -P 22 [email protected]; replace both the port and address when your configuration differs.
  8. Verify authentication, directory listing, upload, download, rename, and removal operations using an account whose permissions are understood. Confirm that the SFTP log records the session.
  9. Only after a successful SFTP test should you proceed to the SFTP-only policy or disable the old FTP listener.

Make ProFTPD SFTP-only

If FTP must be removed rather than run in parallel, use a login policy that denies access in the main server context and re-allows it only inside the SFTP virtual host:

<Limit LOGIN>
  DenyAll
</Limit>

<VirtualHost 203.0.113.10>
  <Limit LOGIN>
    AllowAll
  </Limit>
  Port 22
  SFTPEngine on
  # host keys, logging, and authentication directives here
</VirtualHost>

How this policy works

The global DenyAll prevents logins in the main server context. The nested AllowAll restores login permission only for the SFTP virtual host. This is a login-control rule; it does not by itself prove that an FTP socket is no longer listening.

Finish the replacement

  1. Review every existing virtual host and included configuration file for another FTP Port, a broader AllowAll rule, or an authentication block that could still expose FTP.
  2. Test SFTP with each class of account that needs access while the old FTP listener is still available.
  3. Remove or disable the FTP listener, commonly the Port 21 setting and its associated virtual-host configuration, after confirming client access.
  4. Close the unused FTP port in the firewall and verify from an external client that it no longer accepts FTP connections.
  5. Keep the SFTP port open and document it for users. If you selected an alternate port, include that port in client profiles and operational runbooks.

Firewall and network considerations

SFTP uses one SSH transport, so it normally needs one reachable TCP port. It does not use FTP’s separate control and data-channel model. That simplifies firewall rules compared with an FTP deployment that relies on active connections or a passive-port range.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Opening a port in a host firewall is not enough if a cloud security group, router ACL, or upstream firewall blocks it. Check the complete path from the client network to the server. Conversely, do not leave port 21 reachable merely because it was open for the old service; remove the rule when FTP is retired.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

When an alternate SFTP port is used, tell clients to select SFTP rather than FTP or FTPS and to enter the exact port. A connection to the wrong port commonly produces a protocol error instead of an authentication prompt.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

“Unknown directive” or the service will not start

The usual cause is that mod_sftp is not installed or loaded, or that the directive is outside the configuration context supported by your build. Confirm module availability and loading first, then validate the file containing the SFTP block. Do not work around the error by deleting SFTPHostKey; that directive is required for SFTP.

Connection refused or timeout

Check that ProFTPD is listening on the selected address and port, that no other SSH service owns the port, and that every firewall layer allows it. A timeout usually indicates routing or filtering; an immediate refusal often indicates that no process is listening or that the service failed to start.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The client reports a changed host key

Compare the key presented by ProFTPD with the host identity you expect for that server. This warning can occur when ProFTPD uses different key files from OpenSSH or when a key was legitimately replaced. Resolve the identity question before accepting a new fingerprint.

Authentication fails with a public key

Confirm that the user’s key is in the file named by SFTPAuthorizedUserKeys, that the path resolves to the intended home directory, and that the key is in the required RFC4716 representation when imported from OpenSSH. Then inspect the SFTP log for a format, permission, or account-policy error.

FTP still works after adding the deny rule

Inspect all included files and virtual hosts. A second listener or a broader login rule may still permit FTP. The global <Limit LOGIN> DenyAll pattern must be applied in the actual main context, and the FTP listener must eventually be removed or disabled if the goal is a protocol replacement.

The log file is empty

Verify that the directory in SFTPLog exists and is writable by the daemon, then confirm that the running process loaded the virtual host containing that directive. A client connecting to another address or port will not generate entries in this virtual host’s log.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SFTP or FTPS: choose deliberately

Choose SFTP when you want an SSH-based transfer service with one transport connection, SSH-style host keys, and optional public-key authentication. Choose FTPS when you must retain the FTP protocol and its existing client or workflow compatibility while adding TLS protection. They are not interchangeable labels, and an FTPS client cannot be expected to speak SFTP merely because both services encrypt traffic.

Client migration is therefore part of the configuration change. An SFTP profile must specify the SFTP protocol, server address, port, and authentication method. Reusing an FTP profile with a different port is not sufficient if the client continues to initiate an FTP handshake.

Production checklist

  • Module: mod_sftp is installed and loaded.
  • Port: the chosen SSH/SFTP port is free, reachable, and documented.
  • Virtual host: SFTP has its own virtual host and a port distinct from FTP.
  • Engine: SFTPEngine on is present in that virtual host.
  • Host identity: required SFTPHostKey files exist and match the OpenSSH host keys where possible.
  • Authentication: password or public-key access is configured for the intended accounts; imported OpenSSH keys are converted to RFC4716 when required.
  • Logging: SFTPLog points to a writable directory and is being updated during a test session.
  • Testing: an SFTP client can authenticate and complete representative file operations before FTP is disabled.
  • Retirement: if SFTP-only is the goal, review included files, remove or disable the FTP listener, and close the old FTP firewall rule.

The essential configuration is not a conversion of FTP into FTPS. It is a new SSH2/SFTP listener supplied by mod_sftp, normally isolated in its own virtual host, using explicit host keys and a separately tested authentication path.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.