SFTP Server Set-Up
Synapse Integration tests require an SFTP server. Here are the steps used to set up a tiny server for this purpose:
Initial Set-Up
The basic process is documented here:
http://kpdirection.com/technology/setting-up-sftp-on-ubuntu/
Some notes on how to follow this process:
Create an ubuntu t1.micro:
change ubuntu password
change root password
Edit /etc/ssh/sshd_config and set
PasswordAuthentication yes
per
http://www.natestiller.com/2012/03/enable-root-user-password-login-on-ec2-ubuntu/
also follow
http://kpdirection.com/technology/setting-up-sftp-on-ubuntu/
to enable sftp
These lines were added at the bottom of /etc/ssh/sshd_config:
Match Group sftpusers ChrootDirectory /sftp PasswordAuthentication yes ForceCommand internal-sftp
There's an extra trick here:
http://stackoverflow.com/questions/18220104/write-failed-broken-pipe-when-trying-to-login-through-ssh-with-a-specific-use
Adding a new user with a different sftp root:
Add a new unix group (unix command is 'groupadd')
Add this group and root dir to /etc/ssh/sshd_config (Note that the "chroot directory has to be owned by root and can't be any group-write access", per http://stackoverflow.com/questions/18220104/write-failed-broken-pipe-when-trying-to-login-through-ssh-with-a-specific-use)
'service ssh restart'
Create a new unix user, set its password (unix commands are 'useradd' and 'passwd')
Add new user to the group (unix command is 'usermod')