[Klug-general] rebooting remote server

Peter Childs pchilds at bcs.org
Wed Oct 2 17:02:22 UTC 2013


Its interesting how much trouble private and public keys can cause. Playing
round with puppet and mcollective to distribute ssh keys certaintly makes
for an interesting task.

We have a useful script that checks if the computer is running windows or
linux remotely via snmp then ssh in and reboots it if its running the wrong
one. After first telling it which to boot via tftp. Cron Switches to linux,
then windows and then back to linux every night. I've got no idea what the
mice think when 200 machines reboot at once in the middle of the night and
start running updates.

Peter
On 2 Oct 2013 11:50, "Paul Littlefield" <info at paully.co.uk> wrote:

> On 02/10/13 11:41, Dan Attwood wrote:
>
>> the uptime command works fine
>>
>> switching back to the shutdown one though gives me:
>>
>>
>>
>> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
>> debug1: client_input_channel_req: channel 0 rtype eow at openssh.com<mailto:
>> eow at openssh.com> reply 0
>> shutdown: Need to be root
>>
>
>
> Aaah, interesting. I note the "shutdown: Need to be root" debug line.
>
>
> 1. What's the exact 'reboot' command you are typing in the ssh command?
>
> 2. What's the line you added to /etc/sudeors?
>
> 3. Read this - http://bit.ly/19gZtjZ
>
> :-)
>
>
>
> --
>
> Paul Littlefield
>
> Telephone: 07801 125705
> Email: info at paully.co.uk
> Web: http://www.paully.co.uk
> Twitter: https://twitter.com/**paullittlefield<https://twitter.com/paullittlefield>
> Wiki: http://wiki.indie-it.com/**index.php?title=Special:**AllPages<http://wiki.indie-it.com/index.php?title=Special:AllPages>
> Blog: http://www.littlefield.info
> Photo: http://gravatar.com/**plittlefield<http://gravatar.com/plittlefield>
> LinkedIn: http://uk.linkedin.com/in/**paullittlefield<http://uk.linkedin.com/in/paullittlefield>
> Trakt: http://trakt.tv/user/**plittlefield<http://trakt.tv/user/plittlefield>
>
> Paul Littlefield is environmentally responsible. Please consider the
> environment before printing this email. This email and any attachment is
> intended for the named addressee only, or person authorised to receive it
> on their behalf. The content should be treated as confidential and the
> recipient may not disclose this message or any attachment to anyone else
> without authorisation. If this transmission is received in error please
> notify the sender immediately and delete this message from your email
> system. All electronic transmissions to and from me are recorded and may be
> monitored. Finally, the recipient should check this email and any
> attachments for viruses. Paul Littlefield accepts no liability for any
> damage caused by any virus transmitted by this email.
>
> Notebook LENOVO ThinkPad Edge
> Intel(R) Core(TM) i3 CPU U 380 @ 1.33GHz
> Portage 2.1.12.2 (default/linux/amd64/13.0/**desktop, gcc-4.7.2,
> glibc-2.15-r3, 3.10.7-gentoo x86_64)
> Gentoo Base System release 2.1
> This is a pre-release version of the X server from The X.Org Foundation.
> latest version in the X.Org Foundation git repository.
> X.Org X Server 1.14.2.902 (1.14.3 RC 2)
> xfce-base/xfdesktop-4.10.2
> x11-drivers/xf86-video-intel-**2.21.15
>
> ______________________________**_________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/**mailman/listinfo/kent<https://mailman.lug.org.uk/mailman/listinfo/kent>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20131002/5d4ca48a/attachment.html>


More information about the Kent mailing list