Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Thanks. This isn't quite what I"m looking for. It doesn't ask for the password the disk is encrypted with. It asks for my local account password twice before attaching the disk. Commented Mar 4, 2012 at 7:40
  • 3
    Oddly enough it only prompts me for a password when I omit the -agentpass option. Commented May 13, 2013 at 9:17
  • 1
    Your answer, using hdiutil, has nothing to do with the OP and question asked, which was about mounting an encrypted disk from the command line, not an encrypted disk image, which are two different things! foundling's answer, using diskutil, is the correct answer! Commented May 1, 2016 at 20:00
  • Good answer. hdiutil is the answer for another related question I had: how to unmount encrypted dmg and "lock" it for it start to ask password on new mount. Answer is hdiutil eject /Volumes/your_volume Commented Aug 18, 2017 at 18:02