T
T
Timebird2020-07-02 20:38:09
linux
Timebird, 2020-07-02 20:38:09

How to mount a folder from your computer via sshfs to a remote server?

Hey!
There is a local computer on macos.
There is also a remote server on ubuntu.

It is necessary that the data folder be on my computer locally, but at the same time, the power to perform operations with the data of this folder was activated from a remote server.
To do this, I was advised to use sshfs. I try like this:

sudo sshfs <логин_на_сервере>@XXX.XXX.X.XXX:/путь/до/папки/на/сервере /путь/до/папки/на/локальном/компьютере

I am asked on the command line about authentication, they ask me to enter the password from ssh ... and that's it, then the folder on the local computer disappears when I try to enter it and move some files there.
I deleted both folders from the server/local_computer - now when I repeat operations, it throws an error:
mount_osxfuse: cannot stat the mount point


Can you please tell me how to mount it? Maybe there are some GUI solutions? I tried SSHFS Mounter , everything works there, files are transferred back and forth, but there is a suspicion that this is just a tool to upload to the server, and not mount your folder to the server, since the place on the server when you drag files there, if you understand correctly, decreases.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Misbakh-Soloviev, 2020-07-03
@Timebird

1) with the command cited in the "I try this" block, you do exactly the opposite: mount the remote folder from the server locally
2) it would be logically correct to mount it while on the server (but for this you will have to locally raise the SSH daemon, plus:
- or forward the port to the server (so that it has somewhere to connect to)
- or raise a peer-to-peer VPN in which both you and the server will be (although, in my practice, they mainly rely on `tap`, and macos have a bad time with this driver)
- or have " direct" address (either on the computer itself, or on a router from which you can forward the port)
3) but in fact, you are doing everything strictly wrong and the entire profit of doing the work remotely will be "eaten" to the overhead due to FUSE and the constant distillation of all i / o operations over the network.
It seems to me that in this case it is better not to hook up the remote server to the local directory, but to synchronize the contents two-way. For example, using SyncThing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question