I'm wondering if it's possible to host a website that acts as an interface to a 'read-only' SFTP service on the same server (i.e. I program a fixed 'get' command that fetches a single file).
My hope was to simply serve a web page with a simple input box to accept a password, which is then used in a client-side JS script to connect to the SFTP service.
Are there any libraries or frameworks I can use to accomplish this?
I understand this might not be the best system design, but my web server (nginx) is only HTTP, and I'd prefer some degree of security in the actual file transfer.
I've also seen that XMLHttpRequest cannot retrieve data via SFTP so this isn't an option.