I have SSHDroid running on the Android. I'm trying to mount it from a Mac using Fuse for OS X. I can SSH, but I am unable to SSHFS.

When I try to sshfs, I get the following error

"mount_osxfusefs: failed to mount /mount@/dev/osxfuse2: Operation not supported on socket"

Has anyone seen this?

Update: Not sure whether this is important. I'm trying to sshfs over wifi.

Android OS: Froyo 2.2
Mac OS X: 10.7.3

  • Have you tried it with a dedicated SSH file explorer (I don't know any for OSX off the top of my head)?
    – Erik
    Apr 28 '12 at 9:38
  • "I'm trying to mount it" makes it sound like you're trying to mount the device storage, but the error sounds like it's the Mac storage. Can you clarify? Apr 29 '12 at 6:20
  • @Erik. No. Since Finder serves all the explorer kind of purpose, I was just trying to find how to mount the device.
    – iobelix
    May 2 '12 at 20:30
  • @MatthewRead. This is what I see. I can ssh but not sshfs. ~> ssh root@ -p 2222 root@'s password: ~/data/berserker.android.apps.sshdroid/home $ ls -d /mnt/sdcard /mnt/sdcard $exit Connection to closed. ~> sshfs root@ /mount -p 2222 root@'s password: ~> mount_osxfusefs: failed to mount /mount@/dev/osxfuse1: Operation not supported on socket ~>
    – iobelix
    May 2 '12 at 20:41
  • @iobelix I primarily asked because knowing whether accessing without sshfs works or not might bring some insight into the issue.
    – Erik
    May 2 '12 at 21:58

There's a bug that prevents the OSXFuse implementation of sshfs from working with many versions of sshd, including the one used by dropbear, which is the implementation used by most SSH server apps for Android, including SSHDroid.

My solution to this problem was just to use a different SSH server app which runs the openssh sshd instead of dropbear. SSHelper is expressly designed to do this, but I prefer to start up the full-ish linux environment provided by Termux and then run sshd from that command line. This has the miraculous side effect of providing a fancy linuxy environment when you ssh in to your phone.

For Termux and possibly also SSHelper, you will need to edit the sshd_config text file if you want to change certain options. SSHelper's config file lives at /data/data/com.arachnoid.sshelper/etc/sshd_config; Termux's is at /data/data/com.termux/files/usr/etc. You'll also have to add your public key to ~/.ssh/authorized_keys if you want to use public key, rather than password, authentication when you log in. The config file is the same as for openssh under Linux so that documentation applies, more or less.

Also for Termux you'll have to apt install openssh in order to run sshd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.