I would like to setup a sftp server using node.js.
I looked at ssh2 module and seems like a good fit to start a sftp server.
I also looked at sftp-stream api, but I am not able to figure out options on how to authenticate a user to my server, which directory would be the root for sftp
If you want to create an SFTP server that also handles authentication and everything (and not just an SFTP server as the subsystem for an OpenSSH server), you need to also code up the ssh2 server portion too. Here's a simple example that only allows password authentication and only starting sftp sessions: