Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ASG V8 remote shutdown w/o passwd

I#m currently working on a shutdown scenario for our servers. My Nagios (centos) Server is the one connected to the UPS (APC) running apcupsd. It shuts down the servers in the propper way:
1. all VMs inside the Citrix XenServer
2. the XenServer itself (both done over a bash script running localy on the XenServer, using xe commands for the VMs).
3. then the open-e storege, which holds the images of the VMs is shut down

(points 1-3 are the reason, why apcupsd in server/client mode won't work, because, that won't handle waiting for the correct order of the shutdown).
And here comes my problem:
ASG V8 seams not to be configurable for being shutdown remotely.
Trys:
1) generating a group shutdown and configure sudo to let all menbers os shutdown group do /sbin/halt or /sbin/shutdown without password.
This simply ignores the NOPASSWD part in /etc/sudoers

2) permit root login and ssh-keys in /etc/ssh/sshd_config.
This won't work, because ASg overwirtes sshd_conifg each (re)boot
AND ASG deletes any authorized_keys in /root/.ssh

Any other ways to attempt the goal (running apcupsd in a highre version of ASG is not, because it most likely won't let me do custom-scripts for apcupsd). AND I HAVE TO run ASG at least as long as the XenServer and the open-e Storage have to communicate with each other


This thread was automatically locked due to age.
Parents
  • Sadly no success so far.
    set the shell access to "root only with ssh keys" and "allow private key auth".
    I tried two ways for the key-generation:
    1. on a linux machine using ssh-keygen
    2. puty-gen on a win machine

    1. will fail with a key error or ask a password
    2. asks for a passphrase even tough the key was generated without passphrase

    EDIT:
    got it working! No idea HOW this got wrong, but for some reason "authorized_keys" was w directory on my system. I deleted tha, did a reboot, after that I had a authorized_keys FILE and everything works like a charm.
    Thanks a lot.
Reply
  • Sadly no success so far.
    set the shell access to "root only with ssh keys" and "allow private key auth".
    I tried two ways for the key-generation:
    1. on a linux machine using ssh-keygen
    2. puty-gen on a win machine

    1. will fail with a key error or ask a password
    2. asks for a passphrase even tough the key was generated without passphrase

    EDIT:
    got it working! No idea HOW this got wrong, but for some reason "authorized_keys" was w directory on my system. I deleted tha, did a reboot, after that I had a authorized_keys FILE and everything works like a charm.
    Thanks a lot.
Children
No Data