SSHFS

From ArchWiki
Revision as of 10:45, 6 January 2007 by Sessy (talk | contribs) (first version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


You can use sshfs to mount a remote system - accessibel via ssh - to a local folder. So You will be able to do any operation on the mounted files with any tool (copy, rename, edit with vim, etc.).

To install the needed packages, do:

pacman -S sshfs

This should install fuse and sshf, and maybe other packages.

To mount a remote directory:

sshfs USERNAME@HOSTNAME_OR_IP:/PATH LOCAL_MOUNT_POINT SSH_OPTIONS
sshfs sessy@mycomputer:/home/sessy /mnt/sessy -C -p 9876

SSH will ask for the password, if needed.
If You don't want to type in your password 49 times a day, than read this: How to Use RSA Key Authentication with SSH

To unmount the remote system:

fusermount -u LOCAL_MOUNT_POINT
fusermount -u /mnt/sessy

Tip: to quickly mount a remote dir, do some file-management and unmount it, put this in a script:

sshfs USERNAME@HOSTNAME_OR_IP:/PATH LOCAL_MOUNT_POINT SSH_OPTIONS
mc ~ LOCAL_MOUNT_POINT
fusermount -u LOCAL_MOUNT_POINT

This will mount the remote directory, launch MC, and unmount it when You exit.