openssh-SNAP-20001207 scp "Bad file descriptor" sort-of work-around

James james at amethyst.nurealm.net
Fri Dec 8 14:50:51 EST 2000


Damien wrote:

> This is your problem here: profile should only be read for interactive
> sessions - the shell does this automatically for you, you should not
> source it in bashrc.
>
> Your shell initialisation for non-interactive sessions must not produce
> any output. This requirement isn't unique to scp, all the tools layered on
> top of rsh have it too.

Ok, I'm having trouble with the language here.  You talk about interactive
and non-interactive sessions, but there are, in fact, for bash:

  a) Login-interactive shells
  b) Non-login-interactive shells
  c) Non-interactive shells

You say "Your shell initialisation for non-interactive sessions must not
produce any output."  Well, it does not, really, none at all, zip.  And
still, scp breaks.  scp is NOT starting a _non-interactive_ shell.  My
question was: Is scp _suppose_ to start a _non-interactive_ shell?  If so,
scp is broken, simple as that.  If not, then let's stop talking about
_non-interactive_ sessions.

I call /etc/profile from ~/.bashrc because I start Non-login-interactive
shells on my virtual terminals, and I want the same initialization as for my
single Login-interactive shell.  Copying the whole /etc/profile into
~/.bashrc seems a silly solution.  Now, if scp is NOT suppose to start a
_non-interactive_ shell, and, in fact, is supposed to start a non-login
_interactive_ shell, then we'll all have to deal with that.

Not much point in deciding what to do without knowing if scp is broken,
other than to suggest that scp ought to be smart enough to toss a little
extraneous text.

So, is scp broken, or is it _suppose_ to invoke an _interactive_ session?

Again, please Cc me, as I'm not subscribed to the list.

Thanks.


James Feeney






More information about the openssh-unix-dev mailing list