Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | RE: SSH wont execute commands with bash |
|---|---|
| Date: | Wed, 15 Nov 2006 13:16:25 -0500 |
You might try adding the -t argument to your ssh call. -----Original Message----- From: listbounce@securityfocus.com [mailto:listbounce@securityfocus.com] On Behalf Of Tonnerre Lombard Sent: Wednesday, November 15, 2006 10:31 AM To: davej Cc: secureshell@securityfocus.com 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 tonnerre.lombard@sygroup.ch
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Scp & sftp with no shell access or restricted access, Mark Senior |
|---|---|
| Next by Date: | IPv6 Link-Local SSH connections, Dustin C. Hatch |
| Previous by Thread: | Re: SSH wont execute commands with bash, davej |
| Next by Thread: | User at host, MR James Edward Stickland |
| Indexes: | [Date] [Thread] [Top] [All Lists] |