K
K
KidsKilla2012-11-08 11:53:08
linux
KidsKilla, 2012-11-08 11:53:08

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 SSHFSas 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_userafter it sshfsconnects to the server.
If it matters, I work from a poppy.
I tried to do this, but apparently it ProxyCommandruns 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"

Are there any other options? There is no root on the server and will not be, only remote_user.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad Zhivotnev, 2012-11-08
@inkvizitor68sl

Connect immediately as remote_user

A
Alukardd, 2012-11-08
@Alukardd

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 question

Ask a Question

731 491 924 answers to any question