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

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Kommentar schreiben

Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.
Um einen Kommentar hinterlassen zu können, erhalten Sie nach dem Kommentieren eine E-Mail mit Aktivierungslink an ihre angegebene Adresse.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Markdown-Formatierung erlaubt
Formular-Optionen