Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know sshfs is used to mount remote directory to local, but I need to mount local directory to remote fs.

I would like to mount a local folder such as:

/home/username/project_directory

onto a remote machine which I have ssh access to, such as:

/var/www/project_directory

The goal being that edits made locally are reflected on the remote filesystem.

share|improve this question
    
fyi: mysteriousswede.blogspot.com/2012/01/… this is possible. –  quinn Apr 4 '14 at 21:04
    
@quinn is it working solution? –  Konga Raju Apr 18 '14 at 4:29
    
Yes, I'm using it currently, seems to work fine –  quinn Apr 18 '14 at 5:14
    
Actually, I have one issue: superuser.com/questions/743316/… –  quinn Apr 18 '14 at 11:31

1 Answer 1

No.

In order to do this "all" you need to do is reverse your logic. You could, for example, set up a 1 liner which would ssh into the remote machine and then use sshfs to mount the remote directory on the local machine on that box. Of-course this might be simplistic what with NAT, firewall rules etc, but you did not describe your usage case.

There are other protocols like SMB and, even better, NFS - but they will suffer similar issues.

The core of the problem you have is that a machine needs to trust the source of the data, and if you can remotely mount a file system that would break one of the core tenets of internet security.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.