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/mountIf fuse throws an error of permission, you have to add your user to the group fuse by typing:
usermod -a -G fuse $userAfter 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 $userin 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 follow_symlinksand/or
-o transform_symlinksThe 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 $user@host:/path/to/dir /path/to/mount -o follow_symlinks"; alias umountMyShare="fusermount -u /path/to/mount";Happy mounting and unmounting.
Comments
Display comments as Linear | Threaded