SSH wont execute commands with bash




Hi,

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
------------------------------------

This seems to cause problems when trying to execute remote commands with
SSH.
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
ok.


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


--
View this message in context: http://www.nabble.com/SSH-wont-execute-commands-with-bash-tf2629316.html#a7337144
Sent from the SSH (Secure Shell) mailing list archive at Nabble.com.



Relevant Pages

  • Re: command stack in buffer
    ... When i use a terminal to execute my commands. ... execute same command multiple times. ... I routinely ssh to two different computers. ... "ssh -" and the shell finds the right one. ...
    (Ubuntu)
  • Re: command stack in buffer
    ... When i use a terminal to execute my commands. ... execute same command multiple times. ... I routinely ssh to two different computers. ... "ssh -" and the shell finds the right one. ...
    (Ubuntu)
  • Re: Learning Lisp
    ... I compared VNC to SSH. ... Some programs can work only over VNC or a similar protocol, so I had a chance to compare these approaches. ... Let's say I need to check access rights on file /home/foo/bar.txt on server quux. ... This is what I would call 'doing it myself' -- I think of something, translate it to shell language, type and get results. ...
    (comp.lang.lisp)
  • Re: [opensuse] different types of shell scripts
    ... Execute commands from a file in the current shell. ... This 'execute' the setting of shell/environment variables. ... and what I would consider BAD PRACTICE is running in the current shell things that should be run in a sub-shell or sub-process. ... There was a "Transient Program Area" and the CLI caused the executive to overlay the CLI with the application. ...
    (SuSE)
  • Re: SFTP is not working
    ... When I try to use sftp or scp2, I get a message like this: ... sftp and scp2 both actually work by running ssh in a subprocess, ... The reason the shell startup files are relevant at all, ...
    (comp.security.ssh)