Results 1 to 4 of 4

Thread: ssh mount in fstab

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Location
    Florence, Italy
    Beans
    170

    [SOLVED] ssh mount in fstab

    After reading several howtos I managed to mount a remote ssh share through a command looking like:

    Code:
    sshfs -o idmap=user myusername@remote:/ ~/remote
    Everything works fine: I can even open documents with Openoffice without any trouble.

    Then I tried to add a permanent mount to my fstab adding the line:

    Code:
    sshfs#myusername@remote:/ /home/myusername/remote fuse defaults,idmap=user 0 0
    as explained in https://help.ubuntu.com/community/SSHFS

    but:
    - if I try

    Code:
    mount /home/myusername/remote
    the answer is "only root can mount..."

    - if I try

    Code:
    sudo mount /home/myusername/remote
    I get "read: Connection reset by peer"

    What should I do to get it working?
    Thanks

    Edit:
    Just in case somebody has the same problem, it can be solved by:
    a) editing /etc/fuse.conf and uncommenting "user_allow_other";
    b) using allow_other in fstab like this: sshfs#alenis@ufficio:<direcotry_to_mount> <mount_point> fuse user,allow_other 0 0
    Last edited by alenis; June 2nd, 2009 at 07:58 AM. Reason: found a solution

  2. #2
    Join Date
    Jul 2006
    Location
    vancouver, bc
    Beans
    44
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ssh mount in fstab

    Thanks so much for posting that solution! I had the same problem and it worked for me. Someone should update that howto document.

    The only difference I had is it would allow me to fstab mount (with the incorrect options given by the howto) but the mount was crazy screwed up - the file permissions were a question marks in ls... Anyway, your edit of the /etc/fuse.conf and different fstab option worked perfect for me.

    Thanks so much!
    I am what I am because of who We all are.
    {I am a Bittorrent addict}

  3. #3
    Join Date
    May 2008
    Location
    Germany, Edingen
    Beans
    3

    Re: [SOLVED] ssh mount in fstab

    Quote Originally Posted by alenis View Post
    Code:
    sshfs -o idmap=user myusername@remote:/ ~/remote

    Code:
    sshfs#myusername@remote:/ /home/myusername/remote fuse defaults,idmap=user 0 0

    Just in case somebody has the same problem, it can be solved by:
    a) editing /etc/fuse.conf and uncommenting "user_allow_other";
    b) using allow_other in fstab like this: sshfs#alenis@ufficio:<direcotry_to_mount> <mount_point> fuse user,allow_other 0 0
    This solved my problem, thank you very much for sharing!

    Two additional notes:

    1. Remember the slash at the end of the folder name on the server, otherwise you get input/output errors.
    2. If you access the server via password, remember to add noauto to the options in fstab.

  4. #4
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: [SOLVED] ssh mount in fstab

    Old thread closed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •