I’m working on a project to create an SFTP Scheduler, and needed an SFTP server to test with. I work on Windows but have an Ubuntu virtual machine that I run through Hyper-V - and I didn’t realise how easy it was to set up a test server. For my future self, here are the steps:

  1. Run Ubuntu virtual machine and log in. The SFTP account will be a local user account, so create one now:

     sudo adduser sftp-test

    Enter a password, and complete any of the other questions. You now have an account you can test with - when the SFTP client logs in it will have access to the above user’s home directory on the machine.

  2. Install the SFTP server

     sudo apt install -y openssh-server
  3. Run the server

     sudo service ssh start
  4. Configure the client

    SFTP client configuration!

  5. And that’s it!

    SFTP connection!