Answer the question
In order to leave comments, you need to log in
How to attach a remote folder via SSHFS as a local one in order to use convenient editors?
Good afternoon!
The task is this: I want to attach a remote folder SSHFS
as a local one in order to use convenient editors, etc.
Problem: I log in to the server under the same name (for example meh
), and the files belong to another user (for example remote_user
), which is accessed through sudo
.
Those. needs to be launched sudo su remote_user
after it sshfs
connects to the server.
If it matters, I work from a poppy.
I tried to do this, but apparently it ProxyCommand
runs the command locally, and not remotely, and therefore did not work:
sshfs [email protected]:/home/remote_user/bla ~/bla -o ProxyCommand="sudo su remote_user"
remote_user
.
Answer the question
In order to leave comments, you need to log in
Well, actually, you can pervert somehow, but at the same time, sudo should be with NO_PASS for one command. Because sshfs does not support interactivity.
sshfs [email protected]_server:/remote/path /local/path -o sftp_server="/usr/bin/sudo -u remote_user /usr/libexec/sftp-server" The
issue of sudo via ssh is solved like this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question