public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] autoexpect?
Date: Sun, 27 Nov 2005 02:29:24 -0500	[thread overview]
Message-ID: <20051127072924.GA25324@waltdnes.org> (raw)
In-Reply-To: <221c6fc80511251100y42a7cffeod9cc6c8a9f17e641@mail.gmail.com>

On Fri, Nov 25, 2005 at 08:00:09PM +0100, Andres Becerra Sandoval wrote

> If you create a private-public pair with ssh-keygen you can access to
> the other machine without a password. Then your script would call ssh
> and probably "sudo /sbin/poweroff" as a parameter to halt the remote
> machine.

  That's exactly what I do.  I turn on my emergency system every couple
of weeks, "emerge --sync" and "emerge --ask --deep --update --world",
run etc-update if necessary and then shut down.  I have a honking big
19" CRT on my desk at home, and the KVM is used elsewhere.  The machine
name is m450 (450 mhz PIII).  My main machine is m3000 (AMD64 3000+).
There is an ordinary user "waltdnes" on m450.  /etc/sudoers on m450
contains the following line...

waltdnes  m450 = (root) NOPASSWD: /sbin/poweroff

  I have a short script ~/bin/stopm450 on m3000 ...

#!/bin/bash
ssh waltdnes@m450 sudo /sbin/poweroff

  To shut down...
  1) via ssh shut down unnecessary programs on m450
  2) exit all ssh sessions to m450
  3) stopm450

-- 
Walter Dnes <waltdnes@waltdnes.org> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2005-11-27  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25 18:44 [gentoo-user] autoexpect? Antoine
2005-11-25 19:00 ` Andres Becerra Sandoval
2005-11-27  7:29   ` Walter Dnes [this message]
2005-11-27 17:29     ` Solved - " Antoine
2005-11-25 19:00 ` Rob Oravec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051127072924.GA25324@waltdnes.org \
    --to=waltdnes@waltdnes.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox