Date: Thu, 19 Jun 2008 17:03:26 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-net@FreeBSD.ORG, tony@crosswinds.net Subject: Re: SCP/SFTP Brain Fart Message-ID: <200806191503.m5JF3QPW084849@lurza.secnetix.de> In-Reply-To: <20080619134338.GA11325@crosswinds.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Tony Holmes wrote:
> > It seems that your shell profile executes stty(1) even
> > for non-interactive shells. That is wrong. Make sure
> > that you shell profiles and rc files do not call stty
> > or produce any output for non-interactive sessions.
> > Such output confuses scp.
>
> So obvious!
>
> The offender:
>
> .login
>
> stty erase ^H
>
> This was a carry over from ages ago when my chosen terminal s/w didn't
> support the backspace mapping.
Ah, so you use csh or tcsh. The execution of profiles is
somewhat broken in (t)csh, there is no separation between
interactive and non-interactive shells.
You can keep the stty statement in your .login file if you
put it int oa conditional, like this:
if ($?prompt) then
stty erase ^H
endif
That works because the variable $prompt is unset for non-
interactive (t)csh sessions.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"The last good thing written in C was
Franz Schubert's Symphony number 9."
-- Erwin Dieterich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806191503.m5JF3QPW084849>
