zsh-users
 help / color / mirror / code / Atom feed
* interactive shell with ssh
@ 2003-08-04 11:11 Andy Spiegl
  2003-08-04 15:36 ` [6433] " Danek Duvall
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andy Spiegl @ 2003-08-04 11:11 UTC (permalink / raw)
  To: ZSH User List

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-04 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-04 11:11 interactive shell with ssh Andy Spiegl
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

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).