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

closed as off-topic by Canadian Luke, teylyn, gronostaj, Ƭᴇcʜιᴇ007, soandos Jul 7 '13 at 2:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve." – Canadian Luke, teylyn, gronostaj, Ƭᴇcʜιᴇ007, soandos
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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