(Click to open topic with navigation)
For data staging to work correctly, you must configure SSH keys to allow the data staging scripts to run without passphrases. In the sample data staging server configuration shown in the image below, davidharris on the student server stages data from the source server student to the destination server labs. The computation occurs on the labs server before Moab stages the output data from labs back to student. The image below demonstrates the SSH connections necessary and how you should configure your SSH keys.
Click to enlarge |
For more details on generating keys, see the ssh-keygen man page and "SSH login without password".
To configure the SSH keys for the data staging transfer script
Run ssh-keygen to generate a public and private rsa key pair.
davidharris@university]$ ssh-keygen
/home/davidharris/.ssh/id_rsa
Copy the university public key to student. Answer yes to continue connecting.
[davidharris@university]$ ssh-copy-id -i ~/.ssh/id_rsa.pub student
Copy the university public key to labs. Answer yes to continue connecting.
[davidharris@university]$ ssh-copy-id -i ~/.ssh/id_rsa.pub labs
The next two steps generate a key-pair for each node. It is acceptable to generate a single key-pair and install it on each node. It does not matter where the key-pair is generated, so long as it is compatible with the SSH client/server.
Generate a key pair on the source host (student) and install the public key generated to the destination host (labs). When prompted for a passphrase, leave it blank and press Enter. Repeat when prompted to retype passphrase.
[davidharris@student]$ ssh-keygen
[davidharris@student]$ ssh-copy-id -i ~/.ssh/id_rsa.pub labs
Generate a key pair on the destination host (labs) and install the public key generated to the source host (student). When prompted for a passphrase, leave it blank and press Enter. Repeat when prompted to retype passphrase.
[davidharris@labs]$ ssh-keygen
[davidharris@labs]$ ssh-copy-id -i ~/.ssh/id_rsa.pub student
Install the modules required to run the data staging scripts. python-paramiko is required for data staging, but python-mock is only required if you intend to run the unit test.
> yum install python-paramiko python-mock
[davidharris@university]$ /opt/moab/tools/data-staging/ds_move_rsync --test=davidharris@student:/tmp/test%davidharris@labs:/tmp
In the same way, transfer a file from the destination host to the source host to verify that the keys work for the users configured.
[davidharris@university]$ /opt/moab/tools/data-staging/ds_move_rsync --test=davidharris@labs:/tmp/test%davidharris@student:/test_processed
Related Topics