Operating System - HP-UX
1827295 Members
3289 Online
109717 Solutions
New Discussion

Re: remote shell to shutdown a HP-UX server ?

 
SOLVED
Go to solution
MARREEL Chris_1
Regular Advisor

remote shell to shutdown a HP-UX server ?

I want to shutdown our HP-UX box starting from a win2000 server.

I already figured out to do a rsh (remote shell) but when I do :
rsh hpserver -l root shutdown -h -y 0

I receive the message from shutdown :
In interactive mode shutdown must be run from an interative input device. Use the -y option for non-interactive mode-- exiting shutdown.

Is there a way of bringing my HP-UX box down when the UPS signals my win2000 machine there is a powerfailure ? all I need is a BATCH-file on my win2000 machine that can bring the HP-UX box down.

Any sugestions ?
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: remote shell to shutdown a HP-UX server ?

Hi Chris:

Try adding the '-n' flag thusly:

# remsh hpserver -l root -n shutdown -hy 0

Regards!

...JRF...
Sanjay_6
Honored Contributor
Solution

Re: remote shell to shutdown a HP-UX server ?

Hi,

you may have to specify the path to shutdown.

use

# remsh hpserver -l root -n /sbin/shutdown -h -y now

hope this helps.

thanks
Sachin Patel
Honored Contributor

Re: remote shell to shutdown a HP-UX server ?

Hi
Try
#remsh server -l root /usr/sbin/shutdown -h -y now
or
#remsh server /usr/sbin/shutdown -h -y now
(because you are already logon as root and if you can rsh as root then you don't have to specify -l user)

Sachin
Is photography a hobby or another way to spend $
MARREEL Chris_1
Regular Advisor

Re: remote shell to shutdown a HP-UX server ?

I indeed had to use FULL PATH to the shutdown command.

so I can remotely shutdown my machine with the command :
rsh hpserver -l root -n "/sbin/shutdown -hy now"

Thanks for the help.

Chris MARREEL