Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 7 Sep 2005 19:40:00 -0400
From: Jean-Sebastien Trottier <jst1@email.com>
To: Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: sftp "connection closed"
Message-ID: <20050907234000.GA13201@gw.jsoft.lan>
Mail-Followup-To: Cygwin Mailing List <cygwin@cygwin.com>
References: <9b83ffd905090709337e1bf8f2@mail.gmail.com> <6.2.1.2.0.20050907172646.04743e18@pop.prospeed.net> <9b83ffd9050907155754d21e1@mail.gmail.com>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1; 	protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY"
Content-Disposition: inline
In-Reply-To: <9b83ffd9050907155754d21e1@mail.gmail.com>
User-Agent: Mutt/1.5.9i
X-IsSubscribed: yes

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Jack,

On Wed, Sep 07, 2005 at 03:57:59PM -0700, Jack Offerman wrote:
> On 9/7/05, Larry Hall <lh-no-personal-replies-please@cygwin.com> wrote:
> > At 12:33 PM 9/7/2005, you wrote:
> > >When "ssh host" works but "sftp host" doesn't, where should I look?
> > >
> > >I appreciate your help.
> >=20
> > I guess you could try starting the server with debugging turned on and
> > see what you get from the logs there.  Results from that are usually
> > more instructive.
>=20
>=20
> It started working again after I changed /etc/passwd.
> When I recreated the file by doing mkpasswd -l, I also
> hand-editted something. That is the last part of the line,
> the login shell. Originally it was bash, and I changed it
> to tcsh. Being a tcsh fan all my life, I've always hated
> when I had to type "tcsh" right after logging in on a ssh
> session because the login shell is bash. When I did
> mkpasswd, I thought it was a perfect time to change
> my login shell to tcsh. And I was happy with the result:
> tcsh running as a login shell.
>=20
> With tcsh as a login shell, however, sftp didn't work.
> With bash, it is working now. So I take it.

IIRC, sftp is picky about what the shell will print on its stdout when
launched in non-interactive mode (this can be seen with $?prompt =3D=3D 0 in
tcsh)... If your .tcshrc or .login files print stuff out, you will most
likely disrupt sftp's "handshaking"...

try running 'tcsh /bin/true' and see if anything comes up on your
terminal and enclose the culprit pieces of your "dot-files" inside a if
($?prompt)

Good luck,
Sebastien

--OXfL5xGRrasGEqWY
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDH3pQWHtULG0eY+ERAotJAJ43WTAssiR4Dn4HqQKDT50no7q0pACePRxD
Iq53tVVCaL71abO1cXJyEEI=
=U+bP
-----END PGP SIGNATURE-----

--OXfL5xGRrasGEqWY--
