Skip to content

howto - mount filesystem via ssh using sshfs

First of all, you have to install "sshfs". After that you just have to type.

sshfs $user@$host:/path/to/dir /path/to/mount

If fuse throws an error of permission, you have to add your user to the group fuse by typing:

usermod -a -G fuse $user

After you re-logged-in you can see by typing "groups" in your shell that everything is done fin. Do not want to logoff? Try

su $user
in your shell. This is a new login and so your new group is available now.

Just another hint, if you want to access symbolic links, try:

-o followsymlinks
-o transformsymlinks

The man page will help you to understand what you are doing.

Now put everything as an alias in your bashrc (or something similar) and you are done :-).

alias mountMyShare="sshfs [email protected]:/path/to/dir /path/to/mount -o follow_symlinks"; alias umountMyShare="fusermount -u /path/to/mount";

Happy mounting and unmounting.

Translate to de es fr it pt ja