dstuecken / sshfs-gui

SSHFS GUI Wrapper for Mac OS X
BSD 3-Clause "New" or "Revised" License
217 stars 26 forks source link

AppleScript: received "remote host has disconnected" while mounting remote drive with SSHFS #15

Open latindancer opened 5 years ago

latindancer commented 5 years ago

Hi, First of all let me say that I have read a lot of articles online (including the ones already published in github.com) before deciding to post this article here.

My machine

Remote server

Issue

but

-- Set remote address (either IPv4 or URL) set remoteAddress to "192.168.1.30" as string

-- Set local path of remote folder set remotePath to "/" as string

-- Set path of local folder where to mount remote folder set localMountPoint to "/Volumes/DATA/remotesrv" as string

-- Set full path of SSHFS application set SSHFSApplicationPath to "/usr/local/bin/sshfs" as string

-- Set options set sshfsOptions to "-o allow_other,defer_permissions"

-- Set command to execute set myCommand to SSHFSApplicationPath & " " & sshfsOptions & " " & remoteUser & "@" & remoteAddress & ":" & remotePath & " " & localMountPoint

-- Set the password of the root user set thePassword to "MYPASSWORD" as string

tell application "Finder"

-- Mount remote folder via SSH
do shell script myCommand password thePassword with administrator privileges

end tell


I received the following error message:

![screenshot](https://user-images.githubusercontent.com/40000532/54499846-4ce5a900-490e-11e9-9316-014791229fdb.png)

**Note**: I've also tried by simply creating a **bin/bash** script as well as an **Automator** script/app but still the same issue.

If I execute the command from the terminal everything is ok but if I try to make it automatic, no chance at all.

BTW I've also tried the AppleScript from [this](https://github.com/porqz/My-AppleScripts/blob/master/Mount%20Remote%20Directory%20With%20SSHFS.applescript) link (obviously customized for my environment) but curiously I get **exactly** the very same error message.

This is driving me crazy.

Can someone help me?

Thanks in advance.
latindancer commented 5 years ago

Did anyone have a look at this topic?

Just leaving this comment in the hope to raise its visibility a bit.

Thanks.

latindancer commented 5 years ago

I can't believe no one experienced this problem.

Can anyone help here please?

old-square-eyes commented 5 years ago

I have this problem trying to mount and connect to a dir on my Jubilinux machine