=head1 NAME

oarsh - remote shell connector for OAR batch scheduler.

oarcp - oarsh compagnon to copy files from a node or to a node.

=head1 SYNOPSIS

B<oarsh> [OPTIONS] <NODENAME> [COMMAND]

B<oarcp> [OPTIONS] [NODENAME:]<PATHNAME> [NODENAME:]<PATHNAME>

=head1 DESCRIPTION

Connect to a node from the job submission frontend of the cluster or any other node.

=head1 OPTIONS

The B<oarsh> mechanism uses I<OpenSSH> client (the ssh command) under the hood to perform connections to remote hosts. Thus most of I<OpenSSH> options can be used (but some are filtered out for security reasons).

=head1 ENVIRONMENT

=over

=item B<OAR_JOB_ID>

If not using the job-key mechanism, the B<OAR_JOB_ID> environment variable has to be set to give the jobid of the job to connect to on the remote node (a node can run several jobs at a same time). This is only required for connecting from outside the job (e.g. from the job submission frontend).

=item B<OAR_JOB_KEY_FILE>

If using the job-key mechanism (see B<oarsub> -k -e/-i), B<oarsh> can use the job-key defined by the B<OAR_JOB_KEY_FILE> environment variable to connect to job on the remote machine. That mechanism can allow one to connect to a job from a machine which is outside the OAR cluster the job belong to (e.g. in a grid of OAR clusters), given the job-key is available on that machine. NB: it is also possible to give the job-key using B<oarsh> -i option.

=back

=head1 EXAMPLES

=over

=item Connecting from within our job, from one node to another one (node23):

> oarsh node-23

=item Connecting to a node (node23) of our job (Id: 4242) from the frontal of the cluster:

> OAR_JOB_ID=4242 oarsh node-23

=item Connecting to a node (node23) of our job that was submitted using a job-key:

> OAR_JOB_KEY_FILE=~/my_key oarsh node-23

=item Same thing but using OpenSSH-like I<-i> option:

> oarsh -i ~/my_key node-23

=back

=head1 NOTES

B<oarsh> inherits from most of OpenSSH capabilities (e.g. X11 forwarding). However, one feature which B<oarsh> does break is the SSH Agent.

The user's OpenSSH configuration files (files in the I<~/.ssh> directory) are not used by B<oarsh>.

For advanced users, when using the job-key mechanism, it is also possible to use ssh directly to connect to a job on a node. Please refer to the documentation of your cluster, or ask the admisitrator of your cluster.

=head1 SEE ALSO

oarsub(1), oardel(1) oarstat(1), oarnodes(1), oarhold(1), oarresume(1)

=head1 COPYRIGHTS

 Copyright 2003-2016 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU General Public License Version 2 or above. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
