Sunday, April 21, 2013

Mount a remote file system using ssh

[CONTEXT]
Access a remote file system  
[WHEN] 
You want to transfer files from/to a server which you have a ssh access
[HOW]   
As root:
install fuse
#apt-get install fuse-utils sshfs ssh
and load its kernel module
#modprobe fuse
add your regular user to fuse's group
#adduser [your-user] fuse
(reboot the machine)
Now using your regular user:
Mount your remote directory:
$ sshfs [user@]host:[dir] mountpoint [options]
e.g.
$sshfs remote-user@remote.server:/remote/directory /home/user/remote/
(If you only put  ':' is going to be your default directory)
Then, you can manipulate your remote folder as a regular local folder.
Unmount your remote directory
$fusermount -u mountpoint
e.g.
$fusermount -u  /home/user/remote/


[SOURCE]
http://www.debianadmin.com/mount-a-remote-file-system-through-ssh-using-sshfs.html 

No comments:

Post a Comment