You can either automatically save a *.m file created from your notebook automatically (Options Inspector -> Selected Notebook -> AutoGeneratePackage, make sure all cells are initialization cells) and run this.
I suggest running it from inside a screen session which keeps the connection alive even after you disconnect. I can also recommend tmux for this if you plan on working remotely regularly.