Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install a dmg file on a remote server. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format.

file says my dmg file is a VAX COFF executable.

share|improve this question
up vote 32 down vote accepted

First, mount the dmg image : sudo hdiutil attach <image>.dmg

The image will be mounted to /Volumes/<image>. Mine contained a package which i installed with: sudo installer -package /Volumes/<image>/<image>.pkg -target /

Finally unmount the image: sudo hdiutil detach /Volumes/<image>.

share|improve this answer
I wrote a blog post about installing .dmg files that you can save as a recipe for the apps you use on your machine. Hope this helps: – grant May 26 '15 at 19:27

You should be able to mount the .dmg using:

hdiutil attach /path/to/file.dmg

And then copy its contents (which appears in /Volumes) where ever you like.

share|improve this answer

You could try the command open disk://host.tld/image.dmg.

share|improve this answer
open didn't do anything, just exit, without error message. – philant Dec 5 '12 at 9:36
Yes it does. I just tested it. It won't display anything until the disk image has been completely mounted, so you will have to wait a minute or so before it appears in /Volumes. (It works if you ssh in and type open path/to/file.dmg. I don't think disk://host.tld/ works though.) – daviewales Dec 5 '12 at 12:19
Helpful, though maybe not exactly what the OP needed. Thanks. – Danny Whitt Feb 9 '14 at 12:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.