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: | Tue, 14 Nov 2006 14:51:13 -0500 |
On Tue, Nov 14, 2006 at 05:02:55AM -0800, davej wrote:
I have sshd running on a solaris system. Due to various reasons my user accounts default shell is csh, but in my .cshrc profile I execute the bash shell if it exists on the system. It looks something like this ------------------------------------ if [ -e /usr/bin/bash ] exec /usr/bin/bash exit fi ------------------------------------
You should not be doing this in .cshrc. You should be doing it in .login. Since "ssh host" spawns a login shell, it will read both .cshrc and .login, which gives the result you desire. "ssh host date" will spawn a NON-login shell, which only reads .cshrc, and then runs the date command. (At least, if I remember my csh well enough.)
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Emulating ssh's -D option, if TCP forwarding is disabled, Thomas Hafner |
|---|---|
| Next by Date: | Re: Scp & sftp with no shell access or restricted access, Rob Munsch |
| Previous by Thread: | SSH wont execute commands with bash, davej |
| Next by Thread: | Re: SSH wont execute commands with bash, Tonnerre Lombard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |