Ubuntu - Setup a SFTP Server
This procedure will setup a SFTP server, thats FTP over SSH on Ubuntu Server. In this instance the FTP server will be for a group of people accessing the same FTP share.
This procedure has been tested against Ubuntu 10.04 LTSFirst we need to install the SSH-Server packages on the Ubuntu server assuming they haven't been installed already. On the console type:
sudo mkdir /srv
Now add the following lines to the bottom of /etc/ssh/ssh_config
Match group ftpshared
To make the config take affect we'll need to restart the SSH daemon:
sudo service ssh restart
Finally we create the user accounts on the Ubuntu server and give them access to the FTP server:
sudo useradd [user_name] -d /srv/ftp/shared -s /bin/false
sudo adduser [user_name] ftpshared
sudo passwd [user_name]
As a final step, open up your FTP client of choice and test the FTP logon process. Also confirm that the user cannot navigate outside of the /srv/ftp/shared area.