Red Hat Bugzilla – Bug 71751
SFTP connections fail using tcsh as shell
Last modified: 2007-04-18 12:45:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
Description of problem:
Using the SSH Secure File Transfer (SFTP) with SSH Secure Shell version 3.1.0
for Windows, I receive a "connection was lost" message with my shell set
to /bin/csh (/bin/tcsh). I get no such error when using /bin/bash. Connections
do not fail with the SSH Secure Shell (SSH) using the same program.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set an account's shell to /bin/tcsh
2. Try to establish a Secure File Transfer to that account with the Windows
SSH SFTP client available from ssh.com.
Actual Results: "Connection was lost."
Expected Results: Expected results can be seen if the same account sets the
default shell to /bin/bash.
No obvious error messages in the server logs to help in figuring this out.
According to the logs, the connection is successful.
I can't reproduce this, using openssh-3.6.1p2-34 both as a server and
Please provide strace logs of the failed session:
Create a wrapper script:
cat > wrapper << EOF
strace -ff -o ~/log /bin/tcsh "$@"
chmod a+x wrapper
Set this wrapper script as user's shell instead of /bin/tcsh
(you will probably have to edit /etc/passwd by hand or at least
add path to the script to /etc/shells), attempt to connect using
You should get a few files in ~/log*, please attach a tarball
Please file this as "NOTABUG". The problem was with a custom startup
script (in /etc/profile.d) that was producing output to STDOUT which
was confusing the SFTP client.