Private editing without relying on password auth (+ socket behaviour) #174
Description
I am interested in using sshcode+code-server to edit files remotely in a multi-user environment. By default anyone on localhost (both on the client and remote) can access the webserver (and edit my files). I want to avoid using a password and would prefer a solution that only makes available the webserver to the user that executes the sshcode command.
Here is what I tried so far:
On the remote this can be achieved by binding to a socket-file in the user directory. Interestingly code-server doesn't seem to clean up the specified "--socket" file when exiting, and refuses to start if the file already exists (I do not know enough about the matter to assess whether this is expected/desired behavior or not, hence I mention it here instead of a separate issue). (already reported coder/code-server#1538)
On the clientside it is not quite so easy: While ssh supports forwarding both TCP->socket and socket->socket, there seems to be no way to access a ".sock" via a graphical browser (see this year old request for chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=451721).
Since this seems to be rather complex, I would like to ask you about your expertise/ideas. Can this be done, or is the use-case for code-server different from my goal (user-private editing).
Currently I use sshfs with local vscode, and was hoping that code-server could improve this workflow.
Best regards,
Tyrius