So below are the steps to do it.
STEP 1: Access using putty
Access your server using putty or from terminal using ssh. I've been using putty to easily access my remote servers since it allows you to create profile on each instance.
It will look something like on the image below.
or you can do it something like this from your terminal/konsole.
ssh username@IP
It will require you to enter your password, just enter your password and hit enter.
STEP 2: Add group for sftp users
groupadd sftpusers
STEP 3: Add your user to group and specify the folder that it is allowed to access.
sftpusers is your groupname and /var/www/test is your default directory for dev user
useradd -g sftpusers -d /var/www/test dev
chown -R dev:sftpusers /var/www/test
Just in case you want to modify your user just copy and change the code below.
usermod -g sftpusers -d /var/www/test dev
Feel free to post for your comments or suggestions. I'm an amateur systems admin and still learning. Thanks ^_^
No comments:
Post a Comment