Difference between revisions of "Sshfs"

From Klaus' wiki
Jump to: navigation, search
(Created page with 'SSHFS is a file system, that works over a SSH tunnel. In order to mount a remote file system (e.g. from your development host) on your local account on the main host (bren) issu…')
 
Line 1: Line 1:
SSHFS is a file system, that works over a SSH tunnel.
+
SSHFS is a filesystem, that works over a SSH tunnel.
  
 
In order to mount a remote file system (e.g. from your development host) on your local account on the main host (bren) issue these commands:
 
In order to mount a remote file system (e.g. from your development host) on your local account on the main host (bren) issue these commands:
Line 20: Line 20:
  
 
Finally issue the sshfs command to mount the remote file system on the mountpoint.
 
Finally issue the sshfs command to mount the remote file system on the mountpoint.
 +
 +
Now the filesystem on the remote development host is available on your primary host (bren).

Revision as of 13:21, 3 March 2011

SSHFS is a filesystem, that works over a SSH tunnel.

In order to mount a remote file system (e.g. from your development host) on your local account on the main host (bren) issue these commands:

$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@host
$ mkdir <-p> <mountpoint>
$ sshfs <username>@<hostip>:/home <mountpoint>

where the ssh-copy-id copies your public ssh-key to the remote host and where ~/.ssh/id_rsa.pub is where your ssh keys resides. If there are no id_rsa.pub you should generate a pair of keys:

$ ssh-keygen

just hit enter to all prompts.

Then you shall create the mountpoint - that is the directory on where you will mount the remote filesystem. The -p creates all directories if they do not exists.

Finally issue the sshfs command to mount the remote file system on the mountpoint.

Now the filesystem on the remote development host is available on your primary host (bren).