SSH wont execute commands with bash


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

This seems to cause problems when trying to execute remote commands with
When running:

$ ssh user1@hostname

I can log into the remote mahcine using ssh.
When running

$ ssh user1@hostname ls /tmp

the command "ls /tmp" does not get executed, the session just seems to hang.
If I remove the call to bash in the .cshrc script everything seems to work

Does anyone know why this is, or know a way around it?

View this message in context:
Sent from the SSH (Secure Shell) mailing list archive at