EC2 Linux Ubuntu VPS is not configured for connections with a password by default. This is a requirement for using SFTP with Adobe DreamWeaver.
This is a how to configure the VPS server to accept connections using SFTP with password authentication.
Allow login with password
Open the SSHD config file:
Find the line:
and change it to:
Stop the user from watching other areas of the server
NB: This is currently not working:
At the end of the file add the following sentences:
Match Group sftpusers ChrootDirectory /var/www/%u ForceCommand internal-sftp
Save the file. Then restart the SSH server.
service ssh restart
Create the restricted SFTP user group
You will now create a SFTP group:
sudo addgroup sftpusers
Create the SFTP only user and add him to the group sftpusers
Replace “USER” with your username.
useradd -d /var/www/ -s /usr/lib/sftp-server -M -N -g sftpusers "USER"
Now give “USER” a password:
Then add the user to another group:
usermod -a -G www-data "USER"
Create the user homedir and website root dir
We are starting with creating the folder that will be the home directory for the user and the root folder for the website.
Replace “DOMAIN” with your domain.
sudo su cd /var/www/ mkdir -p /var/www/"DOMAIN" /var/www/.ssh chown "USER":sftpusers /var/www/"DOMAIN" /var/www/.ssh chown "USER":www-data /var/www/"DOMAIN" /var/www/.ssh sudo chown -R www-data /var/www chmod 700 /var/www/.ssh
Create the website in apache.
cd /etc/apache2/sites-enabled ls
Duplicate and modify an existing site or create at new site
as described in this how to:
How to add a websites to EC2 Ubuntu LTS instances
Add a shell to the group
Add the following to the bottom of the file and save: