Execution of ssh Environment

SSH (secure shell) is a common method for using remote machines. In this section, we explain execution of OmniRPC applications using ssh. In addition, like using Globus, create a remote executable module, register a program, and to create program are almost the same. The only different details is the description of hostfile (hosts.xml).

Preparing for SSH
Hostfile for SSH
Setting for firewall: Using SSH's port forwarding and MXIO
Execution of client program
Setting of Login name

Preparing for SSH

In this example, the environment is described below.

  1. Client host is alice.hpcs.is.tukuba.ac.jp .
  2. Remote host is dennis.hpcc.jp.
  3. There is not a firewall between the remote host and client host. In other words, programs can communicate without limitation on the non special privilege port.

We assume that we can use SSH here. That is, we assume that we can access with SSH from alice.hpcs.is.tsukuba.ac.jp to dennis.hpcc.jp.

When using SSH, you should set up auto authentication with an ssh-agent. If you do not, you have to type in the password at each remote host. If you want to know more detail, see man of "ssh-agent", In this example, we outline the usage below.

  1. Activate ssh-agent, and set the environment variable on your terminal.
    $ eval `ssh-agent`
    
  2. Register the pass phrase with ssh-add.
    $ ssh-add
    type your pass phrase here.
    Identity added: /home/msato/.ssh/id_rsa (/home/msato/.ssh/id_rsa)
    $
    

With the above procedure, you should confirm whether auto authentication is running or not.

$ ssh dennis.hpcc.jp

With the above command, you can login to remote hosts without typing the password.

Hostfile for SSH

To use dennis.hpcc.jp, you should describe hosts.xml, and execute the client program with this hostfile. Write the hostfile for using ssh, as follows.

<?xml version="1.0" ?>
<OmniRpcConfig>
   <Host name="dennis.hpcc.jp" arch="i386" os="linux">
   <Agent invoker="ssh" />
   </Host>
</OmniRpcConfig>

This description is for activating the agent with ssh. In this specification, the relationship between the agent and rex is shown below.

Setting for firewall: Using SSH's port forwarding and MXIO option.

There will be some firewalls between remote hosts and the client host when the client host and the remote hosts extend across administrations. When we use ssh for agent activation, programs communicate with the client and agent, using ssh port forwarding. Using the ssh port forwarding function, we can communicate between remote executable modules on the remote host and client program. This is OmniRPC's multiplex communication function. If you want to use this feature, specify the "mxio" attribution in the agent.

<?xml version="1.0" ?>
<OmniRpcConfig>
   <Host name="dennis.hpcc.jp" arch="i386" os="linux">
   <Agent invoker="ssh"  mxio="on"  />
   </Host>
</OmniRpcConfig>

the relationship of the agent and rex with this option is as follows. In this case, communication with rex and the client program occurs by way of rex.

Execution of client program

You can execute in same manner without using hosts.xml.

% a.out --hostfile hosts.xml  args ... 

Setting of Login name

In addition, if the user name is different on client host and remote host, describe hostfile.xml as follows.

<?xml version="1.0" ?>
<OmniRpcConfig>
   <Host name="dennis.hpcc.jp" user="msato" arch="i386" os="linux">
   <Agent invoker="ssh" mxio="on"  />
   </Host>
</OmniRpcConfig>