0

I am using sshfs (with OSXFUSE) to mount a remote file system on a local directory. In the terminal it looks like

sshfs username@myremoteserver.com: /path/to/local/directory

Then it asks for my password and done.

How can I include this in an applescript?

I tried

do shell script "sshfs username@myremoteserver.com: /path/to/local/directory"

but it does not do anything, which I expect is because it is waiting for a password. I don't know how to prompt securely for a password, pass it to bash and run the ssh command. Ideally I would like to do this without opening a terminal window. Note that the password may change all the time so that I cannot use the Keychain Access.

This other question is similar but only works for the superuser password.

Community
  • 1
  • 1
fffred
  • 596
  • 4
  • 19
  • Is there some reason you can't use an SSH key for authentication, instead of a password? – Kenster Feb 14 '15 at 03:03
  • @Kenster, I am not familiar with SSH keys, but I expect that I would need root permission on the remote server, which I have not. I have just been given a password, which changes often, so I can't use Keychain or similar. – fffred Feb 14 '15 at 20:16
  • @Kenster, actually, the problem is not root permission, but the administrators of the remote server do not allow SSH keys. – fffred Feb 17 '15 at 14:58

0 Answers0