From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17957 invoked from network); 4 Aug 2003 11:12:12 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Aug 2003 11:12:12 -0000 Received: (qmail 9471 invoked by alias); 4 Aug 2003 11:12:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6433 Received: (qmail 9460 invoked from network); 4 Aug 2003 11:11:59 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Aug 2003 11:11:59 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [217.160.134.217] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Aug 2003 11:11:59 -0000 Received: (root@lyta.akte.de) by lyta.akte.de id convert rfc822-to-8bit; Mon, 4 Aug 2003 13:11:50 +0200 Received: from condor.int.spiegl.de (really 80.184.227.55 [De337.pppool.de]) by lyta.akte.de via kasmail (2.4) id 2003-08-04 13:11:49 KRecCount: 1 Received: from condor.int.spiegl.de (spiegl@localhost [127.0.0.1]) by condor.int.spiegl.de (8.12.6/8.12.6/Debian-6Woody) with ESMTP id h74BBm7W006528 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Mon, 4 Aug 2003 13:11:48 +0200 Received: (from spiegl@localhost) by condor.int.spiegl.de (8.12.6/8.12.6/Debian-6Woody) id h74BBmLO006526 for zsh-users@sunsite.dk; Mon, 4 Aug 2003 13:11:48 +0200 X-Authentication-Warning: condor.int.spiegl.de: spiegl set sender to zsh.Andy@spiegl.de using -f Date: Mon, 4 Aug 2003 13:11:48 +0200 From: Andy Spiegl To: ZSH User List Subject: interactive shell with ssh Message-ID: <20030804111148.GA5224@spiegl.de> Mail-Followup-To: ZSH User List Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8BIT User-Agent: Mutt/1.4i X-PGP-GPG-Keys: mail -s "send pgp" auto@spiegl.de Organization: KasCada Gbr 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