Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 8 Sep 2005 09:26:09 +0200 From: Corinna Vinschen To: Cygwin Mailing List Subject: Re: sftp "connection closed" Message-ID: <20050908072609.GY5555@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Cygwin Mailing List References: <9b83ffd905090709337e1bf8f2 AT mail DOT gmail DOT com> <6 DOT 2 DOT 1 DOT 2 DOT 0 DOT 20050907172646 DOT 04743e18 AT pop DOT prospeed DOT net> <9b83ffd9050907155754d21e1 AT mail DOT gmail DOT com> <20050907234000 DOT GA13201 AT gw DOT jsoft DOT lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050907234000.GA13201@gw.jsoft.lan> User-Agent: Mutt/1.4.2i On Sep 7 19:40, Jean-Sebastien Trottier wrote: > Hi Jack, > > On Wed, Sep 07, 2005 at 03:57:59PM -0700, Jack Offerman wrote: > > On 9/7/05, Larry Hall 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. > > > > > > 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. > > > > > > 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. > > > > 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 == 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 advice. I'm using tcsh as login shell as well and I have no problems to use it with sftp. The described behaviour is a good indication for noisy rc scripts, as you say. Btw., scp has the same problem and there's nothing the developers can and will do about that. IIRC, we had a similar discussion on this list a few years ago. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/