To Create a SFTP User in Ubuntu

Steps

sudo useradd -d /home/yoursite.com client_user

sudo passwd client_user

subsystem sftp internal-sftp
Match User client_user
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp

To Edit SSH config

sudo nano /etc/ssh/sshd_config

To Debug SSH

sudo sshd -t

 

Reference:

  1. https://wisdmlabs.com/blog/create-an-sftp-user-with-limited-access-on-ubuntu/