2 Replies Latest reply: Feb 26, 2014 7:43 AM by ussuriysk
ussuriysk Level 1 (0 points)

I'm trying to use putty/plink to login to my mac (from a w7 pc) and use hdiutil to mount an encrypted dmg. I've tried several ways:

          plink -ssh user@server hdiutil attach -stdinpass file.dmg

                    I get prompted for the login password but when I enter it and press return there is no response. No further prompt for the dmg password.

          putty -ssh user@server -m textfile

          (where text file contains either the hdiutil command above, or names a shell script on the mac containing the command)

                    In this case I get prompted for the login password and it's accepted, but then the cmd window doesn't accept any further input.

                    I know that the login password is being accepted because I can echo some text before hdiutil command in the script.


Oddly, it's happy to DETACH a mounted dmg.

          plink -ssh user@server hdiutil detach /Volumes/mounteddmg

                    takes the login password and ejects the volume on the mac. Works every time.


I keep thinking that the problem lies in hdiutil's -stdinpass argument, perhaps it's not seeing the incoming putty/plink connection as stdin?

iMac, OS X Mavericks (10.9.2)