Where to get openssh-sftp-server from

Context: In Remote per project containers snapcraft ssh’s into the LXD container to run sshfs inside in slave mode so that the project folder is mounted into the container, with an sftp-server running on the machine running snapcraft (as opposed to the default sshfs mode where the container would need to ssh into the snapcraft machine).

In lxd: Mount project folder via sshfs in case of a remote @sergiusens suggested to lazily install sftp-server with apt-get. Up until now snapcraft doesn’t install anything on the client machine, provided LXD is available from a snap or package.

  • snapcraft could depend on sftp-server in the case of a package and bundle sftp-server in the case of the snap.

  • We could install an sftp-server snap after creating and maintaining one, that works on non-Ubuntu systems.

  • We could lazily install sftp-server on Ubuntu only, until we have backends for other distros, and otherwise prompt the user to do it by hand.

  • We could just bail out with an error and tell the user to install a package.

I hope I managed to accurately summarize the options that came up in a short discussion in a hangout with @sergiusens and @elopio.

To my mind, the first option, depending on and bundling respectively, seemed the easiest for us and the least annoying for the user of snapcraft… @elopio suggested to check the size impact of bundling sftp-seryer. I don’t know if there are other concerns with bundling it.

Thanks for getting this started. Can I ask that you add a quick introductory note on why you want to install this package so everyone is on the same page?

Done. Summarized the role of sshfs and linked to
Remote per project containers for further details.

there is the fuse-support interface that allows you to use sshfs from the host machine through fuse… (not sure if that helps here but i thought i should mention it)

In this case, sshfs is run inside the container via SSH, so I don’t think this applies. But it’s good to know about this interface.

We go with the last option in the case of lxd and was sort of inspired by this

mk-build-deps -i
mk-build-deps: You must have equivs installed to use this program.

and complaints about some people not wanting lxd installed by default on their systems.

1 Like