OpenSSH SFTP server
Secure File Transfer Program.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Note: We were unable to fetch the official website (https://www.openssh.com/), so the content below is based on known information about OpenSSH. For specific options and version details, please refer to the official documentation and the man pages (sshd_config(5), sftp-server(8)).
Introduction
OpenSSH is an implementation of the SSH protocol developed and maintained by the OpenBSD project and released under permissive BSD-style licenses. It is the default SSH implementation on most Linux distributions, BSD systems, and macOS. The SFTP server is the file transfer component of OpenSSH and runs as an SSH subsystem. Once a client connects and authenticates over SSH, it can upload, download, and manage files through the encrypted channel.
OpenSSH offers two SFTP server implementations:
- sftp-server: a standalone executable that sshd invokes as a subsystem.
- internal-sftp: an SFTP implementation built into sshd. It requires no additional executable, which makes it especially well suited for use with chroot.
Key Features
- Encrypted transfer: All data and authentication credentials are encrypted over SSH, unlike FTP, which transmits in plain text.
- Complete remote file operations: Upload, download, list directories, rename, delete, create directories, change permissions, and more.
- Reuses SSH authentication: Supports SSH authentication methods such as passwords and public keys, so no separate account system is needed.
- Chroot isolation: Use
ChrootDirectoryto confine users to a specified directory. - SFTP-only access: Use
ForceCommand internal-sftpto prevent users from getting a shell. - Per-user or per-group policies: Use
Match User/Match Groupto configure different users separately. - Logging: You can set the log level and log facility for SFTP operations, which is useful for auditing.
- Read-only mode: sftp-server supports a read-only option that prohibits write operations.
Target Users and Use Cases
- System administrators who need to transfer files securely between servers or between clients and servers.
- Teams that want to replace outdated FTP services and offer file exchange to customers or partners.
- Hosting services that need to give users restricted file access, such as website file uploads.
- Automation scripts and backup jobs, which can work with
sftp,scp,rsync, or various SFTP clients.
Core Strengths
- OpenSSH is installed by default on most Unix-like systems, so it works out of the box.
- No extra port is needed. It shares port 22 (or your custom port) with SSH, which keeps firewall configuration simple.
- It is maintained by the security-focused OpenBSD team, its code is rigorously audited, and it is very widely used.
- Good compatibility: mainstream clients such as FileZilla, WinSCP, and Cyberduck all support SFTP.
- Free and open source, with permissive licenses.
Installation and Deployment
On most Linux distributions, you can install the OpenSSH server directly with the package manager, for example:
# Debian / Ubuntu
sudo apt install openssh-server
# RHEL / Fedora
sudo dnf install openssh-server
Enable the SFTP subsystem in /etc/ssh/sshd_config:
Subsystem sftp internal-sftp
The following example restricts users in the sftpusers group to SFTP only and locks them into their own directories:
Match Group sftpusers
ChrootDirectory /srv/sftp/%u
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
Note: the chroot directory and all its parent directories must be owned by root and must not be writable by other users. After changing the configuration, restart the sshd service for it to take effect.
Technical Requirements
- A Unix-like operating system (Linux, BSD, macOS, etc.). Windows also provides OpenSSH components.
- The SSH port must be open.
- Clients must support the SFTP protocol.
Notable Characteristics
- SFTP is a file transfer protocol based on SSH. It is not the same thing as FTPS (FTP over TLS), and the two are not compatible with each other.
- OpenSSH does not natively provide a web interface or virtual user management. If you need these features, consider a dedicated SFTP server solution such as SFTPGo.
Discover more
Deluge
Lightweight, cross-platform BitTorrent client.
NGINX
HTTP and reverse proxy server, mail proxy server, and generic TCP/UDP proxy server.
OnionShare
Securely and anonymously share a file of any size.
Pingvin Share
A self-hosted file sharing platform that combines lightness and beauty, perfect for seamless and efficient file sharing.
Pingvin Share X
Pingvin Share X is a secure and easy self-hosted file sharing platform.
PsiTransfer
Simple open source self-hosted file sharing solution with robust up-/download-resume and password protection.