January 2018
Intermediate to advanced
376 pages
8h 45m
English
With the exception of the slight difference in user-creation commands, this procedure works the same for either CentOS or Ubuntu. So, you can use either one of your virtual machines to follow along. We'll begin by creating an sftpusers group.
sudo groupadd sftpusers
Create the user accounts, and add them to the sftpusers group. We'll do both operations in one step. On your CentOS machine, the command for creating Max's account would be:
sudo useradd -G sftpusers max
On your Ubuntu machine, it would be:
sudo useradd -m -d /home/max -s /bin/bash -G sftpusers max
Open the /etc/ssh/sshd_config file in your favorite text editor. Find the line that says:
Subsystem sftp /usr/lib/openssh/sftp-server ...