• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WBXPress.NET

Website Developement Guide

  • apache2
  • nginx
  • mysql
  • php7
  • SSL
  • wordpress
  • genesis
  • caching
  • seo

How to Create Multiple SFTP User in VPS

Updated on 14th August 2016 Leave a Comment

Are you managing your own VPS? Do you host multiple site on a single VPS? Then you may create multiple FTP (File Transfer Protocol) users to upload files for multiple sites. This guide is how to create multiple SFTP user for VPS. SFTP is secure FTP.

You need to follow these steps after remote login to your VPS using root user (or a user having sudo permission) credential.

1. create a user.

sudo adduser --no-create-home anthony

you will be prompted to set a password as well as few other information.

2. Create a group

addgroup --system filetransfer

3. Add user to the group

usermod -G filetransfer anthony

4. Define which path to access

sudo mkdir /var/www/html/anthony
sudo chown root:root /var/www/html/anthony
chmod 755 /var/www/html/anthony
sudo usermod -d /var/www/html/anthony anthony

5. Limit access to this path

cd /var/www/html/anthony
sudo chown anthony:filetransfer *

6. Configure ssh

sudo nano /etc/ssh/sshd_config

a) Modify Subsystem sftp

Change from:

Subsystem sftp /usr/lib/openssh/sftp-server

Modify to:

Subsystem sftp internal-sftp

b) Add the following code at the end of file

Match Group filetransfer
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

7. Restart ssh service

sudo service ssh restart

Now, you can access the specified path using FileZilla with the following credential.

Host: sftp://website.com
Username: anthony
Password: password
Port: 22

Hope it helps. If you have any better suggestion you are most welcome.

Filed Under: FTP Tagged With: ubuntu

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Most Popular Posts

  • Remove/ Defer Render-blocking JavaScripts
  • Customizing Genesis eleven40-pro Theme
  • Free Genesis Child Theme by WBXPress
  • Host Multiple Sites with SSL in Ubuntu 18.04
  • 25 Ways to Boost Website Traffic that Really Work

Recent Comments

  • Ruhul on Customizing Genesis eleven40-pro Theme
  • Priya Agarwal on Customizing Genesis eleven40-pro Theme
  • mimi roy on Remove/ Defer Render-blocking JavaScripts
  • danish choudhary on Customizing Genesis eleven40-pro Theme
  • Radhe on Customizing Genesis eleven40-pro Theme

Copyright © 2021 · Powered by WordPress · Log in