Sftp using ssh users to identify users. That’s why when we edit /etc/ssh/sshd_config we also can access same infos to sftp client. Connecting sftp is simple as below line
sftp -oPort=2101 firstname.lastname@example.org
#if port is default
But when we try to restrict user to his home directory we have to add some other rules.
First of all we have to have a user that can not authorized as root. (adduser command) after that we should change permissions of that user’s home directory as below