Execute parallel jobs under ORCA
I was able to set up the ssh and orca under my account. I could not do it with a script it did not work, but when I typed each command on the command line it eventually worked. Below are the steps I did
>cd ~/.ssh
>rm known_hosts
> ssh-keygen -t rsa
> cp id_dsa.pub authorized_keys2
> chmod go-rwx authorized_keys2
> ssh-agent $SHELL
> ssh-add
The above commands take care about the ssh. From now on it should not ask about the password. The last step is to run orca with a dummy input file, like the one we used before, see below.
#orca dummy input
# this calculates the gs. energy of the H atom. # !UHF PAL4
*xyz 0 2
H 0.0 0.0 0.0
*
I run orca typing
> /opt/orca/orca dummy.inp
It should ask whether you want to permanently add the key to the list of known hosts, answer yes and that is all. It should not ask about password. Next time you run orca it should not ask any questions just crank the data.
Open a remote FrontEnd in Mathematica and get the fonts right
Since this question keeps popping up and I've yet to see a step-by-step solution in the archive or FAQ lists, here are the exact steps one can follow to open a remote front-end from a unix machine under X11. First, you need to put the required fonts on your local machine. in my case, it's a G5 Mac running OSX and I want to run a remote kernel/front-end from my Beowulf cluster. For other configurations, you will need to modify the command slightly to reflect your exact configuration.
On the remote unix machine, cd to the file containing the fonts. On my beowulf cluster, these are in /usr/local/Wolfram/Mathematica/4.2/SystemFiles/Fonts
In this directory are three subdirectories: AFM, BDF, Type1, tar these up tar cvf mathfonts.tar */* and ftp this over to your local machine.
cd /Applications/Mathematica\ 5.0.app/SystemFiles/Fonts/
This may not be necessary, it was just a safeguard so that I would not overwrite my local fonts. Put the tar file in the SystemFiles/Fonts/X11 directory and untar. This command will do the trick tar xvf mathfonts.tar Next, you need to add these to your x11 font-path. This you do with xset +fp On the local machine in an X11 terminal window: xset +fp /Applications/Mathematica\ 5.0.app/SystemFiles/Fonts/X11/AFM xset +fp /Applications/Mathematica\ 5.0.app/SystemFiles/Fonts/X11/BDF xset +fp /Applications/Mathematica\ 5.0.app/SystemFiles/Fonts/X11/Type1
Finally, on the local machine---in an X11 terminal window xhost +remotemachine ssh -X remotemachine
Now, on the remote machine, simply start up Mathematica....and voila, you have your fonts.
Some of these steps may not be necessary, and I have only tried this on a OSX/Linux combination...but the prescription above works.
If you're running MacOSX...this will not work in the "Terminal.app", you need to use an X11 terminal window.
Using SSH without password prompts
Say we're looking to connect to system Y from system X without having to enter our password. On X, the system you'd be starting on, type: machineX:% ssh-keygen -t rsa When prompted for a passphrase, leave it blank. (that's the whole point of this exercise, otherwise you have to enter whatever passphrase you specify everytime you try to login instead of your old password.) This should create two files in your ~/.ssh/ directory, id_rsa and id_rsa.pub. The .pub file is your public key, the other your private. The private key should be only readable by you, the public is ok to be read by anyone. There are some other permissions that should be set on your ~/.ssh/ directory, but unless you've messed with something the defaults should take care of it, they did in my case. If you're concerned, look for another tutorial online.
The contents of your id_rsa.pub need to be placed in the ~/.ssh/authorized_keys file on any system you want to ssh to (from the current machine) without a password.
If your account on machine Y doesn't already have a ~/.ssh/authorized_keys, (which it shouldn't, otherwise why would you be reading this), just do the following:
machineX:% scp ~/.ssh/id_rsa.pub you@machineY:~/.ssh/authorized_keys
If you do already have a ~/.ssh/authorized_keys, just add the contents of id_rsa.pub manually to the existing file.
And that should be it. You should be able to ssh from machine X to machine Y without being prompted for a password.
A STERN WARNING: Keep in mind the security implications of this. In my case it essentially means that if anyone ever compromises my account on my firewall then they've comprimised my account on my desktop, and that's not good. It's all a question of what risk you're willing to assume to make things a little more comfortable.
