zsh-users
 help / color / mirror / code / Atom feed
From: Andy Spiegl <zsh.Andy@spiegl.de>
To: ZSH User List <zsh-users@sunsite.dk>
Subject: interactive shell with ssh
Date: Mon, 4 Aug 2003 13:11:48 +0200	[thread overview]
Message-ID: <20030804111148.GA5224@spiegl.de> (raw)

Hi,

I have to admin several remote machines.  Usually I just do a
 xterm -e ssh some.other.host
which works just great.

But now I want to setup a mechanism that executes commands on _all_ remote
machines, e.g "apt-get update; apt-get upgrade".  So I wrote a script that
loops through the list of hosts and calls:

 xterm -e ssh -l root $somehost "apt-get update; apt-get upgrade; echo 'Press ENTER to close'; read"

First this seemed to work great, but then I noticed that "apt-get upgrade"
failed sometimes because that PATH was set wrong so that it couldn't find
ldconfig for example.  I noticed that ssh sets some default path and zsh
doesn't modify that because it's not an interactive shell.  Doh.

After I found a solution to that (using zshenv) I next noticed that
"dialog" (which is used by the Debian install scripts to ask configuration
questions) doesn't work either because TERM is not set and because zsh
thinks there is no tty.  Now I'm stuck.  :-(

Is there any way to execute commands on remote hosts allowing user
interaction and everything - just as if I would first login with an
interactive shell and then execute these commands???

Thanks a lot for any pointer,
 Andy.

-- 
           http://peru.spiegl.de  Our project
      http://radiomaranon.org.pe  Radio Marañón, Jaén, Perú
                              o      _     _         _
  ------- __o       __o      /\_   _ \\o  (_)\__/o  (_)          -o)
  ----- _`\<,_    _`\<,_    _>(_) (_)/<_    \_| \   _|/' \/       /\\
  ---- (_)/ (_)  (_)/ (_)  (_)        (_)   (_)    (_)'  _\o_    _\_v
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Computers in the future may weigh no more than 1.5 tons.
  - Popular Mechanics, 1949


             reply	other threads:[~2003-08-04 11:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 11:11 Andy Spiegl [this message]
2003-08-04 15:36 ` [6433] " Danek Duvall
2003-08-04 15:42 ` Dan Nelson
2003-08-04 16:03   ` Andy Spiegl
2003-08-04 16:30 ` Bart Schaefer

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=20030804111148.GA5224@spiegl.de \
    --to=zsh.andy@spiegl.de \
    --cc=zsh-users@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).