Page 7 of 14 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 139

Thread: SSHFS AUTOmount on Feisty

  1. #61
    Join Date
    Dec 2007
    Location
    Durban
    Beans
    127
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: SSHFS AUTOmount on Feisty

    Hi,

    I'm trying to mount an image file of a partition captured by dd thru gzip.

    Someone mentioned gvfs-mount might do the trick, but I'm unable to find any documentation on how to do this.

    Can someone point me in the right direction or let me have the syntax for this?

    Many thanks,

    Dave

  2. #62
    Join Date
    Feb 2007
    Location
    New York
    Beans
    894
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: SSHFS AUTOmount on Feisty

    Quote Originally Posted by cov View Post
    I'm trying to mount an image file of a partition captured by dd thru gzip.

    I don't think that's really relevant to this thread, but which command did you use?
    "Please remember to do things the Ubuntu way. There is always more than one solution to a problem, choose the one you think will be the easiest for the user. ... Try to think as a green user and choose the simplest solution." — Code of Conduct

  3. #63
    Join Date
    Dec 2007
    Location
    Durban
    Beans
    127
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: SSHFS AUTOmount on Feisty

    Quote Originally Posted by Endolith View Post
    I don't think that's really relevant to this thread, but which command did you use?
    My apologies.

    I have started another thread here...http://ubuntuforums.org/showthread.p...26#post5988126

  4. #64
    Join Date
    Apr 2007
    Beans
    519

    Re: SSHFS AUTOmount on Feisty

    Thank you for your tutorial, it works well. Could you please explain the exec options in /etc/fstab

  5. #65
    Join Date
    Jun 2007
    Beans
    3

    Re: SSHFS AUTOmount on Feisty

    Kudos to Darwin Award Winner for this great HOWTO!
    Alas, despite everything else working I cannot run the mounting script via sudo, what I suppose thwarts automounting. Permission problems anyone (I'm running Intrepid, in case it matters)? Advice on this would be really appreciated, I'm just to close to perfect happiness to give up now.

  6. #66
    Join Date
    Feb 2007
    Beans
    77

    Re: SSHFS AUTOmount on Feisty

    Quote Originally Posted by Hedian View Post
    Kudos to Darwin Award Winner for this great HOWTO!
    Alas, despite everything else working I cannot run the mounting script via sudo, what I suppose thwarts automounting. Permission problems anyone (I'm running Intrepid, in case it matters)? Advice on this would be really appreciated, I'm just to close to perfect happiness to give up now.
    Odd. I'm not sure why it wouldn't work. I've upgraded to Intrepid, and I'm still using this script unmodified. When run as root, the script is supposed to mount each mount point as its owner, as specified in the uid option in fstab. I suppose it's possible that my user-detection code is wrong for some rare cases. Obviously, I can't test it on other people's computers. I'm afraid that if the script doesn't work as is, you'll have either give up or learn bash scripting and debug it yourself. Sorry.

  7. #67
    Join Date
    Jun 2007
    Beans
    3

    Re: SSHFS AUTOmount on Feisty

    Thanks for the fast reply, at least I have a starting point now.
    And some bash kung fu could come in handy anyway.

  8. #68
    Join Date
    Dec 2008
    Beans
    1

    Re: SSHFS AUTOmount on Feisty

    I'm having a problem as well. Running mountsshfs as user works fine, and running umountsshfs as root works fine. I've successfully set up passwordless ssh login, and the unmount script runs fine when I disable the network. But if I re-enable the network, the script doesn't seem to run. If I run mountsshfs as root, I get this error:

    Code:
    read: Connection reset by peer
    /home/<user>/mount-ssh failed to mount as <user>
    I can only assume it's throwing this same error when the network is enabled, but I don't know how to check that.

    Does anyone know what the problem may be? The client computer is running Ubuntu Hardy, connecting to a server running Mac OS X. If you need more info, just ask.

    EDIT: I got it working. I forgot that I had set a password for my id_rsa file. I created a new one without a password, and now it works fine. However, if this is not safe, I'd like to know if there is an alternative. For now, though, it seems fine.
    Last edited by NetGenSuperstar; December 11th, 2008 at 04:37 AM.

  9. #69
    Join Date
    May 2008
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: SSHFS AUTOmount on Feisty

    Hi All!

    After more than 15 hours of error searching I stumbled across an easier way.
    My problem was that mount, if-up and if-down runs as root. So when sshfs where looking for the rsa-key located in my home-dir it could not find any as it was looking in the root's home dir. The ssh rsa-authentication failed and ssh where asking for password. The sshfs rejected that response and exited with status "read: Connection reset by peer".

    http://www.debian-administration.org/articles/587

    In this post I read that sshfs added the option "password_stdin" by march 2008. So now it is possible to mount automaticly when network goes up by adding the following line in /etc/network/if-up/mountsshfs:
    Code:
    !#/bin/sh
    echo "yourPassword" | sshfs username@server:remoteDir /mountDir -o allow_other,uid=yourUserId,gid=yourGroupId,password_stdin
    And simply add the following to /etc/network/if-down/umountsshfs:
    Code:
    !#/bin/sh
    umount /mountDir
    This is the minimalistic way and I use it here just to share what I found. I'm sure you can tweak this solution to make it more error safe and secure.

    EDIT: Of course you need to chmod mountsshfs and umountsshfs to 755 and set the root as owner so that they will become executable.
    Last edited by alex wingnut; December 22nd, 2008 at 03:12 PM. Reason: Forgot to add chmod

  10. #70
    Join Date
    Feb 2007
    Beans
    77

    Re: SSHFS AUTOmount on Feisty

    Quote Originally Posted by alex wingnut View Post
    My problem was that mount, if-up and if-down runs as root. So when sshfs where looking for the rsa-key located in my home-dir it could not find any as it was looking in the root's home dir.
    Yes, the script does run as root. However, it is designed to use sudo to run the sshfs command as the appropriate user. Notice that in my examples, I explicitly assign an owner to the sshfs mount in the fstab options. My script uses this to find out which user to mount the share as.

    Of course you need to chmod mountsshfs and umountsshfs to 755 and set the root as owner so that they will become executable.
    Whoa, there. If you're putting your login password in those scripts, it's probably more appropriate to chmod the scripts 700, since they now contain sensitive information. The least you can do is require the root password to read them, in the name of security.

Page 7 of 14 FirstFirst ... 56789 ... LastLast

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
  •