How to Set Up SFTP on Your VPS Server

calendar_month March 25, 2025 schedule 2 min read visibility 202 views
person
Valebyte Team
How to Set Up SFTP on Your VPS Server

How to Configure SFTP on a VPS Server?

A secure lock icon with a server rack keyhole, symbolizing SFTP security for VPS. If you have a Virtual Private Server (VPS hosting) and want to set up Secure File Transfer Protocol (SFTP) to manage your files, this guide will help you do it quickly and easily.

Let's start with the fact that SFTP is a secure file transfer protocol that uses encryption to protect your information. It's a great alternative to plain FTP, which transmits data in the open and is less secure.

To configure SFTP on your VPS server, you will need command-line access and administrator credentials.

Step 1: Installing OpenSSH

The first step is to install OpenSSH, which is the software for secure data transfer via the SSH protocol.

Run the following command in your terminal:

sudo apt install openssh-server

After installing the OpenSSH server, you will be able to use SFTP to transfer files to your VPS server.

Need a Reliable VPS for Your SFTP Server?

Our VPS plans are perfect for securely storing and transferring your data. Choose the ideal option for stable SFTP operations. — from €4.49/mo.

Explore VPS Plans →

Step 2: Creating a New User

Create a new user who will use SFTP to access your VPS server. This will allow you to manage access and the security of your information.

Use the following command to create a new user:

sudo adduser username

Replace "username" with your desired username.

Step 3: Configuring SFTP Access

Now configure SFTP access for the created user. Edit the SSH configuration file by entering the following command:

sudo nano /etc/ssh/sshd_config

Find the line "Subsystem sftp /usr/lib/openssh/sftp-server" and change it to:

Subsystem sftp internal-sftp

Add the following block to the end of the file:

Match User username ChrootDirectory /home/username ForceCommand internal-sftp

After making changes to the configuration file, restart the SSH service:

sudo systemctl restart sshd

Step 4: Connecting to the Server via SFTP

Now you can connect to your VPS server via SFTP using an SFTP client such as FileZilla or WinSCP. Enter the server's servers with IP addresses, username, and password to start transferring files securely.

Now you have SFTP configured on your VPS server. Using this secure file transfer protocol, you can manage your data safely and efficiently.

Scale Your SFTP with Cloud Instances

Need more flexibility and power? Our cloud instances offer the scalability you need for your growing SFTP requirements.

Get Cloud Instances →

Share this post:

support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.