[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can I mount a local directory to remote host?



On Thu, Nov 10, 2011 at 04:15:12PM +0800, Benimaur Gao wrote:
> seems sshfs can only mount the directory from remote host to local
> mount point. I want to do the contrary -- mount the local dir to
> remote host, and including the content under this directory.
> Is it possible? if so, one more step, can i do such things behind NAT?

No. There is no way, as far as I'm aware to mount a directory on a
remote host. Probably because this is a major security breach. (Imagine
if I were to mount my /bin onto your /bin).

However, what you probably need to do is look at it from the other side.
I shall assume you are trying to share a directory on A called /srv to a
remote machine B as directory /mnt. This CANNOT be done from A. However,
you should be able to connect to B and the mount A:/srv onto /mnt using
SSHFS. In essense, then, B becomes the local machine and A is the remote
one.


-- 
Darac Marjal

Attachment: signature.asc
Description: Digital signature


Reply to: