Operating System - HP-UX
1835989 Members
1981 Online
110088 Solutions
New Discussion

Re: Remote shell environment

 
SOLVED
Go to solution
Kennethyap
Frequent Advisor

Remote shell environment

Dear Experts,
How can I set the environment on the remote shell? Is the #remsh using the .profile environment or the /etc/profile environment?
Is there are file that I can set the remote shell envirronment. Currently I try to #remsh to another server to shutdown the oracle database but seem not working because the environment not defind. I have the the environment in $HOME/oracle/.profile & /etc/profile.
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor

Re: Remote shell environment

Hi,

'remsh' simply executes the corresponding shell with -c option. So, .profile or /etc/profile won't get executed. However,
look at the man page of 'remsh'.
//
If the remote shell is /usr/bin/sh, the following command line sets up the environment for the remote command before executing the remote command:

remsh otherhost . .profile 2>&- \; command

The 2>&- throws away error messages generated by executing .profile when stdin and stdout are not a terminal.//

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
E. ten Pas
Occasional Contributor
Solution

Re: Remote shell environment

You also can run a job on the remote system, put all the PATH information in the job and acces the job as follows: remsh SYSNAME su -oracleuser -c /usr/batch/JOBNAME This shuold do the trick.