The ccm_rsh command is the default tool to run remote commands. The ccm_rsh command uses the rsh protocol with few enhancements. To use your own tool, such as ssh, to run remote commands, customize the remexec.cfgfile.
Windows
- When developing your own tool to have similar functionality as ccm_rem, consider the following items.
- Preserve the return status of the remote commands. (Required)
- Add the ability to replicate local environment variables to remote machines. (Optional)
- Preserve the current directory for remote commands. (Optional)
- Modify the corresponding fields in the remexec.cfg file to use your own tool.
For example, change the file to use your tool by editing the following line in the remexec.cfg file.
Find the following line:
DEFAULT DEFAULT ccm_rem %hostname [ %shell /C ] %cmdline
Make the following changes:
DEFAULT DEFAULT my_rexec_tool %hostname %cmdline
UNIX
- When developing your own tool to have similar functionality as ccm_rsh, consider the following items.
- Preserve the return status of the remote commands. (Required)
- Add the ability to replicate local environment variables to remote machines. This change is optional, however, you need this ability if you use the Rational® Synergy Distributed auto_receive capability.
- Preserve the current directory for remote commands. (Optional)
- Modify the corresponding fields in the remexec.cfg file to use your own tool.
For example, change DCM to use your tool by changing the following line in the remexec.cfg file.
Find the following line:
DEFAULT DEFAULT %DCM -HOME,PWD,TMP ccm_rsh -n [-s %shell] %hostname
Make the following changes:
DEFAULT DEFAULT %DCM -HOME,PWD,TMP my_ssh %hostname
- If you plan to use your tool for DCM, implement the partial environment variable replication feature.
The replicated environment variables are controlled by the CCM_REMOTE_ENV environment variable passed to your tool.
Set the CCM_REMOTE_ENV format to ALL to replicate all environment variables to the remote machine.