Hi there,
I’m currently working on an application that will allow users to upload files to their own servers via SSH/SFTP.
Erlang’s :ssh library (and by extension also sshex) use the ~/.ssh directory by default to store all trusted hosts and SSH keys. This is not what I want because it would obviously be a bad idea to have all users share the same keys.
Unfortunately, the only way to use multiple keys seems to be changing the user_dir
parameter in the :ssh.connect/2
call.
I’ve worked a lot with Qt/C++ before and Qt can create resource files that are accessible through “virtual” directores, i. e. instead of a real path in the filesystem, you give a path such as ":/my_resource.file"
and the Qt file library will “understand” that the file needs to be read from the resource file.
Now I wonder: Is there any such thing that I could use with Elixir/Erlang where I store a user’s ssh information in my database or an OTP app and then trick Elixir/Erlang into reading from that like from a path?
I came across an Erlang library called evfs which seems to do pretty much that but it has no license, has been unmaintained for six years and isn’t even available as a Hex package …
Any suggestions on how to approach this problem would be appreciated