I am assuming that you already have a connection via Terminal to the school server.
You need to download the .dmg first. Goto the directory in which you want to download the dmg file (command
Then enter this into the terminal:
curl http://mozilla.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/mac/en-US/Firefox%2025.0.1.dmg -o firefox25.dmg
This is the latest Firefox Release for OS X.
Then mount the dmg:
hdiutil attach firefox25.dmg
Goto the mounted dmg (probably under Volumes):
There you can find the
Firefox.app which you can now copy to your Applications folder:
cp Firefox.app /Applications/Firefox.app
To unmount the dmg:
hdiutil detach /Volumes/Firefox