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 follow_symlinks
and/or
-o transform_symlinks
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 $user@host:/path/to/dir /path/to/mount -o follow_symlinks"; alias umountMyShare="fusermount -u /path/to/mount";
Happy mounting and unmounting.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Markdown format allowed
Form options