mgorbach / macfusion2

Macfusion2
568 stars 127 forks source link

Authentication Failed error on 10.8 Mountain Lion #32

Open jamesalley opened 12 years ago

jamesalley commented 12 years ago

OSXFUSE 2.4.2 Macfusion 2.0.4

When trying to mount SSH volumes I get error: "Could not mount filesystem: Authentication has failed."

FTP mounts are fine.

Another colleague has the same problem.

All my connections were bookmarked and worked prior to the update to Mountain Lion.

On the OSXFUSE side, the issue was closed: https://github.com/osxfuse/osxfuse/issues/36

minioak commented 12 years ago

A workaround for this is to use public-key authentication.

vhugogarcia commented 12 years ago

Any tutorial about how to use a public-key authentication to make it work? thanks in advance

scp commented 12 years ago

Not working for me either with Mountain Lion - I've reverted to using command line sshfs instead.

Is a fix planned?

vhugogarcia commented 12 years ago

Could you help me how to do it using command line? any tutorial? thanks in advance

scp commented 12 years ago

You'll want something along the lines of:

sshfs user@host:/ /Volumes/mountpoint -oallow_other,idmap=user,uid=501,transform_symlinks,follow_symlinks,reconnect,volname=mountname ,defer_permissions

If you don't have the sshfs binary, you can grab it from here: http://code.google.com/p/macfuse/wiki/MACFUSE_FS_SSHFS

There's quite a few tutorials online if you need more help.

minioak commented 12 years ago

Tutorial for setting up access to your server via public key authentication

http://www.petefreitag.com/item/532.cfm

jamesalley commented 12 years ago

That tutorial explains it very simply. And it works.

vhugogarcia commented 12 years ago

Worked like a charm, in case you need to copy the key and paste it in the remote server, you can use this command line:
pbcopy < ~/.ssh/id_rsa.pub

brucedesertrat commented 12 years ago

Is there any plans on fixing this, because public key logins are not at all acceptable on our servers...

brucedesertrat commented 12 years ago

here is the log entry for a failed connection:

Oct 18 14:34:32 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : Prefs update FSEvents callback received Oct 18 14:34:32 dbdev2.pharmacy.arizona.edu Macfusion[504] : Prefs update FSEvents callback received Oct 18 14:36:56 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : Mounting Oct 18 14:36:56 dbdev2.pharmacy.arizona.edu Macfusion[733] : Note status changed for fs <MFClientFS: 0x4007429e0> (kalendaetest) to Waiting to Mount Oct 18 14:36:56 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : Task launched OK Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : sshfs: cannot find sshnodelay.so warning: ssh nodelay workaround disabled Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Reading configuration data /Users/johnson/.ssh/config Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Reading configuration data /etc/ssh_config Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Connecting to kalendaetest.pharmacy.arizona.edu [150.135.124.79] port 22. Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Connection established. Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: identity file /Users/johnson/.ssh/id_rsa type -1

debug1: identity file /Users/johnson/.ssh/id_rsa-cert type -1

debug1: identity file /Users/johnson/.ssh/id_dsa type -1

debug1: identity file /Users/johnson/.ssh/id_dsa-cert type -1

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3

debug1: match: OpenSSH_5.3 pat OpenSSH*

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_5.9

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: SSH2_MSG_KEXINIT sent

debug1: SSH2_MSG_KEXINIT received

debug1: kex: server->client aes128-ctr hmac-md5 none

debug1: kex: client->server aes128-ctr hmac-md5 none

debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: SSH2_MSG_KEX_DH_GEX_INIT sent

debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Server host key: RSA d4:31:49:f8:1f:a4:79:17:31:2b:03:6b:5c:df:ce:34

debug1: Host 'kalendaetest.pharmacy.arizona.edu' is known and matches the RSA host key.

debug1: Found key in /Users/johnson/.ssh/known_hosts:49

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: ssh_rsa_verify: signature correct Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: SSH2_MSG_NEWKEYS sent

debug1: expecting SSH2_MSG_NEWKEYS

debug1: SSH2_MSG_NEWKEYS received

debug1: Roaming not allowed by server

debug1: SSH2_MSG_SERVICE_REQUEST sent

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: SSH2_MSG_SERVICE_ACCEPT received Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

debug1: Next authentication method: publickey

debug1: Trying private key: /Users/johnson/.ssh/id_rsa

debug1: Trying private key: /Users/johnson/.ssh/id_dsa

debug1: Next authentication method: password

debug1: read_passphrase: can't open /dev/tty: Device not configured

Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu Macfusion[733] : Note status changed for fs <MFClientFS: 0x4007429e0> (kalendaetest) to Failed to Mount Oct 18 14:36:57 dbdev2.pharmacy.arizona.edu macfusionAgent[288] : debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

debug1: No more authentication methods to try.

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

remote host has disconnected
alexreg commented 12 years ago

No plans to fix this still?? This really is a crucial issue that I hope can be resolved soon.

brucedesertrat commented 12 years ago

I think I've found the issue. The returns form the sshfs commands are not being properly parsed, I think.

In 10.8 something got left on in the kernel compile so that DLYD_ warnings are emitted when a sudo or other setuid programs are run, see: https://discussions.apple.com/thread/4143805?start=0&tstart=0

I do have DLYD_LIBRARY_PATH set in my environment.

Running the sshfs command in terminal worked, after passing the error mentioned in the Apple discussion thread above.

Today I commented out the DYLD_LIBRARY_PATH entry in my /etc/bashrc file, rebooted and lo and behold, Macfusion works again.

alexreg commented 12 years ago

This environment variable is probably useful though. I mean, I have no idea what it does, but I am disinclined to simply remove it.

What is the ideal solution in this case do you think?

On 16 Nov 2012, at 00:02, brucedesertrat notifications@github.com wrote:

I think I've found the issue. The returns form the sshfs commands are not being properly parsed, I think.

In 10.8 something got left on in the kernel compile so that DLYD_ warnings are emitted when a sudo or other setuid programs are run, see: https://discussions.apple.com/thread/4143805?start=0&tstart=0

I do have DLYD_LIBRARY_PATH set in my environment.

Running the sshfs command in terminal worked, after passing the error mentioned in the Apple discussion thread above.

Today I commented out the DYLD_LIBRARY_PATH entry in my /etc/bashrc file, rebooted and lo and behold, Macfusion works again.

— Reply to this email directly or view it on GitHub.

brucedesertrat commented 12 years ago

On Nov 15, 2012, at 5:04 PM, Alex Regueiro notifications@github.com wrote:

This environment variable is probably useful though. I mean, I have no idea what it does, but I am disinclined to simply remove it.

What is the ideal solution in this case do you think?

On 16 Nov 2012, at 00:02, brucedesertrat notifications@github.com wrote:

I think I've found the issue. The returns form the sshfs commands are not being properly parsed, I think.

In 10.8 something got left on in the kernel compile so that DLYD_ warnings are emitted when a sudo or other setuid programs are run, see: https://discussions.apple.com/thread/4143805?start=0&tstart=0

I do have DLYD_LIBRARY_PATH set in my environment.

Running the sshfs command in terminal worked, after passing the error mentioned in the Apple discussion thread above.

Today I commented out the DYLD_LIBRARY_PATH entry in my /etc/bashrc file, rebooted and lo and behold, Macfusion works again.

Ah well, another fine theory completely demolished by reality. I re-instated the DYLD_LIBRARY_PATH variable, and MacFusion still works.

WHY it's suuddenly started working again I have no idea.

Bruce Johnson

If the States are the Laboratories of Democracy, Arizona is the Meth Lab

minioak commented 12 years ago

Have just tried this again on 10.8.2. It now works. I have made no changes anything other than the updates to OS X. I am assuming there is something in the patches that have fixed the underlying issue. Suggest that this issue is closed with an upgrade to 10.8.2 recorded as the fix.

alexreg commented 12 years ago

Incorrect. The same issue occurs on 10.8.2; latest versions of everything.

Sent from my iPhone

On 19 Nov 2012, at 21:38, John Mitchell notifications@github.com wrote:

Have just tried this again on 10.8.2. It now works. I have made no changes anything other than the updates to OS X. I am assuming there is something in the patches that have fixed the underlying issue. Suggest that this is issue closed with an upgrade to 10.8.2 recorded as the fix.

— Reply to this email directly or view it on GitHub.

minioak commented 12 years ago

OK - come to think of it, the other update that has happened for me is that the server has upgraded to Centos 6. Either way, it works for me now.

alexreg commented 12 years ago

Patches for what? The issue is still very much present on 10.8.2. I have tried on several computers now!

On 19 Nov 2012, at 21:38, John Mitchell notifications@github.com wrote:

Have just tried this again on 10.8.2. It now works. I have made no changes anything other than the updates to OS X. I am assuming there is something in the patches that have fixed the underlying issue. Suggest that this is issue closed with an upgrade to 10.8.2 recorded as the fix.

— Reply to this email directly or view it on GitHub.

certator commented 11 years ago

Hi! I researched into problem, but still not found exact place there it can cause. It seems that problem somewhere in new_sshfs_askpass. My current workaround is:

1) Install SSHKeychain.app 2) go to /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources 3) copy sshfs-static to sshfs-static.old 4) create new sshfs-static and paste to it

#!/bin/bash
export DISPLAY=":0";
export INTERACTION=1;
export SSH_ASKPASS="/Applications/SSHKeychain.app/Contents/Resources/PassphraseRequester"
/Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static.old "$@"

5) make it executable 6) SSHKeychain.app must be started before asking password (PassphraseRequester require it)

I will try to found exact source of problem later.

imcsit commented 11 years ago

Has anyone tried installing XQuartz? http://xquartz.macosforge.org/landing/

10.8 removed OS X's repackaged X11 so a default install of OS X 10.8 will not have X11 libraries or executables. We have found that on a default machine OSXFUSE 2.5.4 with Macfusion 2.0.4 will not run.

Console messages are similar to those posted above. As soon as Xquartz is installed the console messages refer to /etc/ssh_config line 20: Applying options for * and /etc/ssh_config line 53: Applying options for *

Macfusion will then mount correctly. We have tested removing these lines after Xquartz is installed and it doesn't break Macfusion, so we are leaning toward the X11 executables being the culprit.

brucedesertrat commented 11 years ago

I'll wager that's what happened; my problems happened just after I updated my system from 10.6 to 10.8 , and I remember finding that X11 no longer worked, when I tried to use something unrelated, so I installed Xquartz per Apple's KB article. That's why it started working again mysteriously.

grmela commented 11 years ago

I can confirm that. After I've installed XQuartz, the login problem disappeared.

x128 commented 11 years ago

Thanks @imcsit, works now

Pezmc commented 11 years ago

Still seeing this issue with macfusion2

pinin4fjords commented 11 years ago

Encountered this problem on Mavericks with up-to-date versions of OSXFuse and MacFusion. XQuartz made it go away.

Autoinducer commented 11 years ago

Seconded on XQuartz fixing it on Mavericks. Was getting pretty peeved until I saw this thread...

brucedesertrat commented 11 years ago

On Oct 25, 2013, at 6:44 PM, Autoinducer notifications@github.com wrote:

Seconded on XQuartz fixing it on Mavericks. Was getting pretty peeved until I saw this thread...

good to know this works on Mavericks too. This is a critical piece of kit for me.

Bruce Johnson

"Wherever you go, there you are" B. Banzai, PhD

cletter7 commented 10 years ago

XQuartz solved the problem on Mavericks for me too.

fedekrum commented 9 years ago

XQuartz solved the problem on Mavericks for me too. The question is WHY? It does not sound a logical thing to me. Something is not well implemented in macfusion. Thanks