Your Ubuntu machine can move files for the whole office without a single password or file crossing the network in plain text. This guide installs the server, creates a proper transfer account and proves the connection works.
SFTP is file transfer that rides inside SSH, so every password and every file is encrypted end to end. On Ubuntu it is not a separate product you hunt for - it is a small part of the OpenSSH server that is already one command away. Below is the full route: install, start the service, make a dedicated user, open the firewall and test the first connection. Do the steps in order and you will have a working server in about fifteen minutes. The hardening steps that make it safe for real use are linked from the sections where they matter.
Ubuntu Desktop and Server both ship with an SSH client, but the server side is a separate package. Install it with:
sudo apt update so the package list is freshsudo apt install openssh-server and confirm with Y/etc/ssh/sshd_config and generates this machine's host keys automaticallyThat is genuinely all the software there is. SFTP is a subsystem of this one service, not an extra download, and it answers on the standard SSH port 22.
The package usually starts the service by itself. Prove it, and make sure it comes back after a power cut:
sudo systemctl status ssh - you want the green active (running) line from the panel abovesudo systemctl enable ssh so it starts at every bootsudo systemctl start ssh brings it back, and sudo systemctl restart ssh is the command you will use after every config change in this seriesOn Ubuntu the service is called ssh, not sshd. Using the wrong name is the most common reason a correct guide appears to fail.
Open the config once and simply look at it: sudo nano /etc/ssh/sshd_config. Near the bottom you should find this line, which Ubuntu includes by default:
Subsystem sftp /usr/lib/openssh/sftp-serverNever hand out your own admin login for file transfers. Make an account that exists only for moving files:
sudo adduser sftpuser and set its password when asked/home/sftpuser and nothing elseOne account per person is the habit that makes the log pages in this series meaningful later. A shared account means a shared blame.
If UFW is active, port 22 needs an explicit pass:
sudo ufw allow OpenSSHsudo ufw status to confirm the rule is listedsftp [email protected], replacing the address with your server's real IP, which ip a on the server will show youyes at the first fingerprint prompt only after reading the guide in this series about verifying that fingerprint - it is the check that proves you reached your server and not an impostorput uploads a file, get downloads one, and exit leavesYour server is now working on the local network. Putting it on the internet is a different decision with extra rules - keys instead of passwords, and the fail2ban guide in this series - so do not forward the router port until you have read those.
See the whole Ubuntu SFTP setup done live, with the exact clicks and commands, in the Technical Anshu video.
Watch Full VideoThe client is, the server usually is not. Installing the openssh-server package adds the service, and SFTP comes with it as a subsystem. There is no separate SFTP package to find.
Port 22, the same port as SSH, because SFTP travels inside the SSH connection. One port carries login and file transfer together, which is why the firewall step is a single rule.
Yes. WinSCP and FileZilla both speak SFTP and connect to an Ubuntu server with just the address, port 22, username and password or key. This series has a full guide on connecting from Windows, including the fingerprint check.