You might try adding the -t argument to your ssh call.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tonnerre Lombard
Sent: Wednesday, November 15, 2006 10:31 AM
To: davej
Cc: [email protected]
Subject: Re: SSH wont execute commands with bash
Salut,
On Tue, 2006-11-14 at 05:02 -0800, davej wrote:
> ------------------------------------
> if [ -e /usr/bin/bash ]
> exec /usr/bin/bash
> exit
> fi
> ------------------------------------
Two notes here:
1. you're not passing on any arguments. These lines should look rather like
this:
if [ -e /usr/bin/bash ]
then
exec /usr/bin/bash "$@"
fi
2. exec already overwrites the process so exit is only going to be reached in
case of error, in which it might be better to return an error or whatever:
if [ -e /usr/bin/bash ]
then
exec /usr/bin/bash "$@"
ret=$?
echo "Failed to execute bash: ${ret}"
exit ${ret}
fi
Tonnerre
--
SyGroup GmbH
Tonnerre Lombard
Lösungen mit System
Tel:+41 61 333 80 33 Röschenzerstrasse 9
Fax:+41 61 383 14 67 4153 Reinach BL
Web:www.sygroup.ch [EMAIL PROTECTED]